Browse Source

Corrected permissions for device component form rendering

Jeremy Stretch 8 years ago
parent
commit
dbf9840b26

+ 1 - 1
netbox/templates/dcim/inc/consoleport.html

@@ -1,5 +1,5 @@
 <tr{% if cp.cs_port and not cp.connection_status %} class="info"{% endif %}>
-    {% if selectable and perms.dcim.delete_consoleport %}
+    {% if selectable and perms.dcim.change_consoleport or perms.dcim.delete_consoleport %}
         <td class="pk">
             <input name="pk" type="checkbox" value="{{ cp.pk }}" />
         </td>

+ 1 - 1
netbox/templates/dcim/inc/consoleserverport.html

@@ -1,5 +1,5 @@
 <tr{% if csp.connected_console and not csp.connected_console.connection_status %} class="info"{% endif %}>
-    {% if selectable and perms.dcim.delete_consoleserverport %}
+    {% if selectable and perms.dcim.change_consoleserverport or perms.dcim.delete_consoleserverport %}
         <td class="pk">
             <input name="pk" type="checkbox" value="{{ csp.pk }}" />
         </td>

+ 1 - 1
netbox/templates/dcim/inc/devicebay.html

@@ -1,5 +1,5 @@
 <tr>
-    {% if selectable and perms.dcim.delete_devicebay %}
+    {% if selectable and perms.dcim.change_devicebay or perms.dcim.delete_devicebay %}
         <td class="pk">
             <input name="pk" type="checkbox" value="{{ devicebay.pk }}" />
         </td>

+ 1 - 1
netbox/templates/dcim/inc/interface.html

@@ -1,5 +1,5 @@
 <tr{% if iface.connection and not iface.connection.connection_status %} class="info"{% endif %}>
-    {% if selectable and perms.dcim.delete_interface %}
+    {% if selectable and perms.dcim.change_interface or perms.dcim.delete_interface %}
         <td class="pk">
             <input name="pk" type="checkbox" value="{{ iface.pk }}" />
         </td>

+ 1 - 1
netbox/templates/dcim/inc/poweroutlet.html

@@ -1,5 +1,5 @@
 <tr{% if po.connected_port and not po.connected_port.connection_status %} class="info"{% endif %}>
-    {% if selectable and perms.dcim.delete_poweroutlet %}
+    {% if selectable and perms.dcim.change_poweroutlet or perms.dcim.delete_poweroutlet %}
         <td class="pk">
             <input name="pk" type="checkbox" value="{{ po.pk }}" />
         </td>

+ 1 - 1
netbox/templates/dcim/inc/powerport.html

@@ -1,5 +1,5 @@
 <tr{% if pp.power_outlet and not pp.connection_status %} class="info"{% endif %}>
-    {% if selectable and perms.dcim.delete_powerport %}
+    {% if selectable and perms.dcim.change_powerport or perms.dcim.delete_powerport %}
         <td class="pk">
             <input name="pk" type="checkbox" value="{{ pp.pk }}" />
         </td>