Explorar o código

Force restriction of RestrictedQuerySet even for superusers

Jeremy Stretch %!s(int64=6) %!d(string=hai) anos
pai
achega
8412f9481c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      netbox/utilities/api.py

+ 1 - 1
netbox/utilities/api.py

@@ -327,7 +327,7 @@ class ModelViewSet(_ModelViewSet):
     def initial(self, request, *args, **kwargs):
         super().initial(request, *args, **kwargs)
 
-        if not request.user.is_authenticated or request.user.is_superuser:
+        if not request.user.is_authenticated:
             return
 
         # TODO: Reconcile this with TokenPermissions.perms_map