fix: let staff bypass object-level project permission checks #24
No reviewers
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thierryade/backend!24
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/staff-object-permission-bypass"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
HasProjectRole.has_object_permissionandCanValidateProject.has_object_permission(apps/orgs/permissions.py) never special-casedis_staff, even though everyget_queryset()inapps.specs/apps.exportsalready does -- so list/create worked for staff with noProjectMembership, but retrieve/update/delete (andPdfExportJobViewSet.download) 403'd.perform_createhas its own explicit staff check), then got 403 on both retrieving the job and downloading it.is_staffbypass to bothhas_object_permissionmethods.Test plan
pytest-- 146/146 passing.pylint/bandit/autopep8 --max-line-length=99-- clean.Closes #23.
🤖 Generated with Claude Code
https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm
📊 Rapports Argus pour cette PR