mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Skip queryset filtering for superusers
This commit is contained in:
parent
486f1a74ab
commit
73b7eb0c7f
@ -66,7 +66,7 @@ class ObjectPermissionRequiredMixin(AccessMixin):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# Update the view's QuerySet to filter only the permitted objects
|
# Update the view's QuerySet to filter only the permitted objects
|
||||||
if user.is_authenticated:
|
if user.is_authenticated and not user.is_superuser:
|
||||||
obj_perm_attrs = user._object_perm_cache[permission_required]
|
obj_perm_attrs = user._object_perm_cache[permission_required]
|
||||||
attrs = Q()
|
attrs = Q()
|
||||||
for perm_attrs in obj_perm_attrs:
|
for perm_attrs in obj_perm_attrs:
|
||||||
|
Loading…
Reference in New Issue
Block a user