about summary refs log tree commit diff
path: root/gn_auth/auth/system/admin/users.py
AgeCommit message (Collapse)Author
6 daysrefactor(admin/users): replace authorised_for2 with can_create_or_delete_userClaude
Use gn-libs' can_create_or_delete_user() + user_roles_on_system() for the privilege check in delete_users(), matching the pattern already used by create_user(). Removes the authorised_for2, system_resource, and AuthorisationError imports that are no longer needed. Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>
6 daysrefactor(users): move delete_users to admin users blueprintClaude
Move POST /auth/user/delete to POST /auth/system/administration/users/delete, consistent with the create endpoint already living there. gn_auth/auth/system/admin/users.py: - Add imports for sqlite3, reduce, Sequence, AuthorisationError, authorised_for2, and system_resource. - Move __delete_users_individually__, __fetch_non_deletable_users__, __non_deletable_with_reason__, and delete_users() from users/views.py. gn_auth/auth/authorisation/users/views.py: - Remove the four functions moved to admin/users.py. The sole known caller (GN2 wqflask/oauth2/users.py) is updated in the accompanying genenetwork2 patch. Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>
6 daysMove create_new_user to gn_auth/auth/system/admin/users.pyClaude Sonnet 4.6
Move the user-creation endpoint from gn_auth/auth/authorisation/users/views.py into the new sysadmin package at gn_auth/auth/system/admin/users.py. New URL: POST /auth/system/administration/users/create Old URL: POST /auth/user/create now issues a 308 Permanent Redirect. The admin blueprint is updated to register the new users blueprint at /users. Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>