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

Transition ComponentCreateView to use ObjectPermissionRequiredMixin

This commit is contained in:
Jeremy Stretch
2020-05-21 16:28:11 -04:00
parent 49b780358e
commit f36c797e98
3 changed files with 72 additions and 72 deletions

View File

@ -293,9 +293,8 @@ class VirtualMachineBulkDeleteView(BulkDeleteView):
# VM interfaces
#
class InterfaceCreateView(PermissionRequiredMixin, ComponentCreateView):
permission_required = 'dcim.add_interface'
model = Interface
class InterfaceCreateView(ComponentCreateView):
queryset = Interface.objects.all()
form = forms.InterfaceCreateForm
model_form = forms.InterfaceForm
template_name = 'virtualization/virtualmachine_component_add.html'