1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Use unrestricted() when compiling ObjectPermissions for user

This commit is contained in:
Jeremy Stretch
2020-06-26 15:28:08 -04:00
parent 04571ce920
commit a452e78fa6

View File

@ -24,7 +24,7 @@ class ObjectPermissionBackend(ModelBackend):
Return all permissions granted to the user by an ObjectPermission.
"""
# Retrieve all assigned ObjectPermissions
object_permissions = ObjectPermission.objects.filter(
object_permissions = ObjectPermission.objects.unrestricted().filter(
Q(users=user_obj) |
Q(groups__user=user_obj)
).prefetch_related('object_types')