about summary refs log tree commit diff
path: root/gn_auth/auth/authorisation/resources/system
AgeCommit message (Collapse)Author
14 daysrefactor(system/views): remove dead deprecation-check code HEAD mainClaude Sonnet 4.6
The /auth/system/roles endpoint has no active blueprint registration — the system Blueprint is only reachable via /auth/resource/system/roles. The `if "/resource/" not in request.path` branch could never fire, so remove it along with _SUCCESSOR, and the warnings import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>
2026-08-31feat(system/roles): add Deprecation header on old pathClaude
GET /auth/system/roles is superseded by GET /auth/resource/system/roles, which has been live since the system Blueprint was registered under the resources Blueprint. Add Deprecation: true and a Link successor-version header when the endpoint is reached via the old path, so callers can discover the new URL. The old registration in auth/views.py already carries a TODO noting it should be removed once consumers are updated. Callers to migrate: - GN2: wqflask/views.py, metadata_edits.py (×3), flask_extensions.py, oauth2/ui.py, oauth2/request_utils.py, oauth2/resources.py (×2) - GN3: gn3/api/metadata.py, gn3/api/case_attributes.py - gn-integration-tests: tests/test_gn_auth_smoke.py Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>
2026-04-23Allow anonymous users "public-view" privileges.Frederick Muriuki Muriithi
The default system-level privilege is the "public-view", i.e. the users can view basic details about the Genenetwork system. If no authorisation is provided when accessing the /auth/system/roles endpoint, return the default role/privilege.
2025-12-29`system_resource(...)` function takes either connection or cursorFrederick Muriuki Muriithi
Refactor to allow the `gn_auth.auth.authorisation.resources.system.models.system_resource` function to take either a database connection or cursor and use that to retrieve the "system resource".
2025-06-09Add a function to fetch the system resource.Frederick Muriuki Muriithi
2024-03-13Define Privilege/Role using frozen dataclass.Munyoki Kilyungi
* gn_auth/auth/authorisation/privileges.py: Import dataclass. Remove NamedTuple import. (Privilege): Use frozen dataclass. (Privelege.dictify): Delete. * gn_auth/auth/authorisation/resources/groups/views.py: Import dataclasses.asdict. (group_privileges): Replace dictify with asdict. (add_priv_to_role): Ditto. (delete_priv_from_role): Ditto. * gn_auth/auth/authorisation/resources/models.py: (assign_resource_user): Replace dictify with asdict. (unassign_resource_user): Ditto. * gn_auth/auth/authorisation/resources/system/views.py: Import dataclasses.asdict. Remove dictify import. (system_roles): Replace dictify with asdict. * gn_auth/auth/authorisation/resources/views.py: (resource_users): Replace dictify with asdict. (resources_authorisation): Ditto. * gn_auth/auth/authorisation/roles/models.py: Remove dictify and NameTuple import. (Role): Use frozen dataclass. (Role.dictify): Replace dictify(priv) with asdict(priv). * gn_auth/auth/authorisation/roles/views.py: Import dataclasses.asdict. Remove dictify import. (view_role): Replace dictify with asdict. * gn_auth/auth/authorisation/users/views.py: (user_roles): Replace dictify with asdict. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-26Initialise package to handle resources of type "system".Frederick Muriuki Muriithi