Skip to content

Commit 9c8e512

Browse files
committed
Implement user_has_any_permission for ParentInheritedPolicy
1 parent 9181193 commit 9c8e512

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

models/permission_policy.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,6 @@ def user_can_create(self, user: User, context: _ParentM) -> bool:
283283
return False
284284
# Default to the permission to edit the parent object
285285
return self.parent_policy.user_has_perm(user, 'change', context)
286+
287+
def user_has_any_permission(self, user: User | AnonymousUser, actions: Sequence[str]) -> bool:
288+
return self.parent_policy.user_has_any_permission(user, actions)

0 commit comments

Comments
 (0)