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

Force restriction of RestrictedQuerySet even for superusers

This commit is contained in:
Jeremy Stretch
2020-06-26 13:18:12 -04:00
parent 95965d65c9
commit 8412f9481c

View File

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