Skip to content

Commit 1a95fa3

Browse files
Relax permissions for API interface view endpoint
Needed for portview of ipdevinfo tool to work for non-admin users This bug was introduced in c2b9002
1 parent e1b320e commit 1a95fa3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

changelog.d/3373.fixed.md

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

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

+3
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,9 @@ class InterfaceViewSet(NAVAPIMixin, viewsets.ReadOnlyModelViewSet):
515515
filter_backends = NAVAPIMixin.filter_backends + (IfClassFilter, NaturalIfnameFilter)
516516
filterset_class = InterfaceFilterClass
517517

518+
# Logged-in users must be able to access this API to use the ipdevinfo ports tool
519+
permission_classes = (RelaxedPermission,)
520+
518521
def get_serializer_class(self):
519522
request = self.request
520523
if request.query_params.get('last_used'):

0 commit comments

Comments
 (0)