mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fix permission evaluation for BulkComponentCreateViews
This commit is contained in:
@ -1162,6 +1162,9 @@ class BulkComponentCreateView(GetReturnURLMixin, ObjectPermissionRequiredMixin,
|
||||
table = None
|
||||
template_name = 'utilities/obj_bulk_add_component.html'
|
||||
|
||||
def get_required_permission(self):
|
||||
return f'dcim.add_{self.queryset.model._meta.model_name}'
|
||||
|
||||
def post(self, request):
|
||||
logger = logging.getLogger('netbox.views.BulkComponentCreateView')
|
||||
parent_model_name = self.parent_model._meta.verbose_name_plural
|
||||
|
Reference in New Issue
Block a user