mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
Force restriction of RestrictedQuerySet even for superusers
This commit is contained in:
parent
95965d65c9
commit
8412f9481c
@ -327,7 +327,7 @@ class ModelViewSet(_ModelViewSet):
|
|||||||
def initial(self, request, *args, **kwargs):
|
def initial(self, request, *args, **kwargs):
|
||||||
super().initial(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
|
return
|
||||||
|
|
||||||
# TODO: Reconcile this with TokenPermissions.perms_map
|
# TODO: Reconcile this with TokenPermissions.perms_map
|
||||||
|
Loading…
Reference in New Issue
Block a user