mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-21 20:18:38 -06:00
fix(virtualization): Hide VM Add Components dropdown without change permission
Wrap the VirtualMachine "Add Components" dropdown in a `virtualization.change_virtualmachine` permission check to match Device behavior and prevent users without change permission from seeing component add actions. Fixes #21580
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_controls %}
|
||||
|
||||
{% if perms.virtualization.change_virtualmachine %}
|
||||
<div class="dropdown">
|
||||
<button id="add-components" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add Components" %}
|
||||
@@ -34,5 +34,5 @@
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user