Skip to content

Commit a43c3c8

Browse files
Relax permissions for API prefix usage endpoint
Needed for subnet matrix tool to work for non-admin users This bug was introduced in c2b9002
1 parent 744afff commit a43c3c8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

changelog.d/3374.fixed.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Relax permissions for API prefix usage view endpoint

python/nav/web/api/v1/views.py

+3
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,9 @@ class PrefixUsageList(NAVAPIMixin, ListAPIView):
921921
# RelatedOrderingFilter does not work with the custom pagination
922922
filter_backends = (filters.SearchFilter, DjangoFilterBackend)
923923

924+
# Logged-in users must be able to access this API to use the subnet matrix tool
925+
permission_classes = (RelaxedPermission,)
926+
924927
def get(self, request, *args, **kwargs):
925928
"""Override get method to verify url parameters"""
926929
get_times(request)

0 commit comments

Comments
 (0)