Skip to content
Snippets Groups Projects
Commit 5ac3ec6a authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Comment has_any_object function

parent c0b56c31
No related branches found
No related tags found
No related merge requests found
Pipeline #24882 canceled
......@@ -75,6 +75,10 @@ def has_any_object(perm: str, klass):
Build predicate which checks whether a user has access
to objects with the provided permission or rule.
Differentiates between object-related permissions and rules.
In case a object-related permissions with the same ContentType class
as the given class is passed, the optimized django-guardian get_objects_for_user function
is used.
"""
name = f"has_any_object:{perm}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment