SavedQuery: optional required_permission, in addition to sharing #3
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
Gilles/bigb-django#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
A host app (Argus, see argus/backend#17) may want a saved query's results gated behind an extra Django permission, on top of the existing owner/shared_users/shared_groups scoping -- e.g. a query that is visible (shared with a group) but whose actual data should only be computed for users who additionally hold some specific permission.
SavedQuery.required_permission(CharField, blank=True): a Django permission codename (app_label.codename), checked in addition to the existing rulespermissions.can_view_results: short-circuit to False whenrequired_permissionis set and the user lacks it (definition visibility viacan_view_savedqueryis unaffected -- this only gates results)savedquery_collection/savedquery_detail) and in the Django adminLabel: feature.