فهرست منبع

Fixes #21579: Display 'add script' button only if user has sufficient permission (#21628)

* Fixes #21579: Display 'add script' button only if user has sufficient permission

* Check for core.add_managedfile permission too
Jeremy Stretch 1 روز پیش
والد
کامیت
9b57512b12
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      netbox/templates/extras/script_list.html

+ 3 - 1
netbox/templates/extras/script_list.html

@@ -15,7 +15,9 @@
 {% endblock tabs %}
 {% endblock tabs %}
 
 
 {% block controls %}
 {% block controls %}
-  {% add_button model %}
+  {% if perms.core.add_managedfile and perms.extras.add_scriptmodule %}
+    {% add_button model %}
+  {% endif %}
 {% endblock controls %}
 {% endblock controls %}
 
 
 {% block content %}
 {% block content %}