mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Transition BulkImportView to use ObjectPermissionRequiredMixin
This commit is contained in:
@@ -652,7 +652,7 @@ class ObjectImportView(GetReturnURLMixin, View):
|
||||
})
|
||||
|
||||
|
||||
class BulkImportView(GetReturnURLMixin, View):
|
||||
class BulkImportView(GetReturnURLMixin, ObjectPermissionRequiredMixin, View):
|
||||
"""
|
||||
Import objects in bulk (CSV format).
|
||||
|
||||
@@ -684,6 +684,9 @@ class BulkImportView(GetReturnURLMixin, View):
|
||||
"""
|
||||
return obj_form.save()
|
||||
|
||||
def get_required_permission(self):
|
||||
return get_permission_for_model(self.queryset.model, 'add')
|
||||
|
||||
def get(self, request):
|
||||
|
||||
return render(request, self.template_name, {
|
||||
|
Reference in New Issue
Block a user