mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 01:48:38 -06:00
Use unrestricted() when compiling ObjectPermissions for user
This commit is contained in:
parent
04571ce920
commit
a452e78fa6
@ -24,7 +24,7 @@ class ObjectPermissionBackend(ModelBackend):
|
|||||||
Return all permissions granted to the user by an ObjectPermission.
|
Return all permissions granted to the user by an ObjectPermission.
|
||||||
"""
|
"""
|
||||||
# Retrieve all assigned ObjectPermissions
|
# Retrieve all assigned ObjectPermissions
|
||||||
object_permissions = ObjectPermission.objects.filter(
|
object_permissions = ObjectPermission.objects.unrestricted().filter(
|
||||||
Q(users=user_obj) |
|
Q(users=user_obj) |
|
||||||
Q(groups__user=user_obj)
|
Q(groups__user=user_obj)
|
||||||
).prefetch_related('object_types')
|
).prefetch_related('object_types')
|
||||||
|
Loading…
Reference in New Issue
Block a user