mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 07:56:44 -06:00
Simplify view actions
This commit is contained in:
parent
670a53e622
commit
013a3ed71e
@ -394,16 +394,12 @@ class VirtualMachineVirtualDisksView(generic.ObjectChildrenView):
|
|||||||
weight=500
|
weight=500
|
||||||
)
|
)
|
||||||
actions = {
|
actions = {
|
||||||
'add': {'add'},
|
**DEFAULT_ACTION_PERMISSIONS,
|
||||||
'import': {'add'},
|
|
||||||
'export': {'view'},
|
|
||||||
'bulk_edit': {'change'},
|
|
||||||
'bulk_delete': {'delete'},
|
|
||||||
'bulk_rename': {'change'},
|
'bulk_rename': {'change'},
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_children(self, request, parent):
|
def get_children(self, request, parent):
|
||||||
return parent.virtualdisks.restrict(request.user, 'view').prefetch_related('tags',)
|
return parent.virtualdisks.restrict(request.user, 'view').prefetch_related('tags')
|
||||||
|
|
||||||
|
|
||||||
@register_model_view(VirtualMachine, 'configcontext', path='config-context')
|
@register_model_view(VirtualMachine, 'configcontext', path='config-context')
|
||||||
|
Loading…
Reference in New Issue
Block a user