From 03b2ab2124e84a4e7f2e8afff9bb19cb51a47143 Mon Sep 17 00:00:00 2001 From: mhdask Date: Mon, 18 Mar 2024 15:09:09 +0100 Subject: [PATCH] permissions fix --- netbox_floorplan/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netbox_floorplan/views.py b/netbox_floorplan/views.py index d8e4920..d29c44b 100644 --- a/netbox_floorplan/views.py +++ b/netbox_floorplan/views.py @@ -17,7 +17,7 @@ class FloorplanSiteTabView(generic.ObjectView): tab = ViewTab( label='Floor Plan', hide_if_empty=False, - permission="netbox_floorplan.view_floorplanobject", + permission="netbox_floorplan.view_floorplan", ) template_name = "netbox_floorplan/floorplan_view.html" @@ -38,7 +38,7 @@ class FloorplanLocationTabView(generic.ObjectView): tab = ViewTab( label="Floor Plan", hide_if_empty=False, - permission="netbox_floorplan.view_floorplanobject", + permission="netbox_floorplan.view_floorplan", ) template_name = "netbox_floorplan/floorplan_view.html" @@ -58,7 +58,7 @@ class FloorplanListView(generic.ObjectListView): class FloorplanAddView(PermissionRequiredMixin, View): - permission_required = "netbox_floorplan.add_floorplanobject" + permission_required = "netbox_floorplan.add_floorplano" def get(self, request): if request.GET.get("site"): @@ -79,7 +79,7 @@ class FloorplanDeleteView(generic.ObjectDeleteView): class FloorplanMapEditView(LoginRequiredMixin, View): - permission_required = "netbox_floorplan.edit_floorplanobject" + permission_required = "netbox_floorplan.edit_floorplan" def get(self, request, pk): fp = models.Floorplan.objects.get(pk=pk)