mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-21 13:45:13 +02:00
fix: use the /access prefix when cleaning up ACEs on delete
The users, groups and roles routes are mounted under /access and ACE paths follow the real route paths. The cleanup after deleting a user, group or role looked at /users, /groups and /roles, so it never matched any ACE. Typed ACEs were still removed by the foreign key cascade, but an ACE on the resource path granted to another principal survived the deletion.
This commit is contained in:
5 files changed
+65
-3
No files matched your search
@@ -290,7 +290,7 @@ async def delete_user(
|
||||
success = await users_repo.delete_user(user_id)
|
||||
if not success:
|
||||
raise ControllerError(f"User '{user_id}' could not be deleted")
|
||||
await rbac_repo.delete_all_ace_starting_with_path(f"/users/{user_id}")
|
||||
await rbac_repo.delete_all_ace_starting_with_path(f"/access/users/{user_id}")
|
||||
|
||||
|
||||
@router.get(
|
||||
|
||||
Reference in new issue
Block a user