-
Notifications
You must be signed in to change notification settings - Fork 4
Labels
Description
Description
Actual behavior
When a Django admin (or superuser) tries to access the Admin Console for a Content Library they didn’t create, a 403 Forbidden error is shown. This happens even though a Django superuser should, by definition, have access to manage roles and permissions for any library.
Expected behavior
Superusers (and staff, if applicable) should always have access to manage roles and permissions for any library.
Screenshot:
Steps to Reproduce
- Log in as a Django administrator (superuser).
- Go to any Content Library you didn’t create.
- Click on Manage Access.
- You’ll see a 403 Forbidden message
Possible Approach
In the short term, ensure all authorization endpoints use the same base permission class that checks whether a user is staff or superuser, and grant access accordingly.
In the long term, this logic should be centralized, not repeated per API:
- Possibly integrated with a core access control mechanism like BridgeKeeper.
- Or handled through a custom Casbin matcher that evaluates staff/superuser status transparently (though this approach may reduce explicitness in permission checks).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done