Просмотр исходного кода

Use unrestricted() when compiling ObjectPermissions for user

Jeremy Stretch 5 лет назад
Родитель
Сommit
a452e78fa6
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      netbox/netbox/authentication.py

+ 1 - 1
netbox/netbox/authentication.py

@@ -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')