FossilRepo
Restrict KB page creation to superusers only
Commit
d9493e500320d200a8af313994402f22b586c6f6160b9b309cdf458ba866fdb9
Parent
596c6d2db588dae…
1 file changed
+1
-1
+1
-1
| --- templates/includes/sidebar.html | ||
| +++ templates/includes/sidebar.html | ||
| @@ -108,11 +108,11 @@ | ||
| 108 | 108 | <a href="{% url 'pages:detail' slug=p.slug %}" |
| 109 | 109 | class="block rounded-md px-3 py-1.5 text-sm {% if p.slug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %} truncate"> |
| 110 | 110 | {{ p.name }} |
| 111 | 111 | </a> |
| 112 | 112 | {% endfor %} |
| 113 | - {% if perms.pages.add_page %} | |
| 113 | + {% if user.is_superuser %} | |
| 114 | 114 | <a href="{% url 'pages:create' %}" |
| 115 | 115 | class="block rounded-md px-3 py-1.5 text-sm text-gray-600 hover:text-brand-light"> |
| 116 | 116 | + New |
| 117 | 117 | </a> |
| 118 | 118 | {% endif %} |
| 119 | 119 |
| --- templates/includes/sidebar.html | |
| +++ templates/includes/sidebar.html | |
| @@ -108,11 +108,11 @@ | |
| 108 | <a href="{% url 'pages:detail' slug=p.slug %}" |
| 109 | class="block rounded-md px-3 py-1.5 text-sm {% if p.slug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %} truncate"> |
| 110 | {{ p.name }} |
| 111 | </a> |
| 112 | {% endfor %} |
| 113 | {% if perms.pages.add_page %} |
| 114 | <a href="{% url 'pages:create' %}" |
| 115 | class="block rounded-md px-3 py-1.5 text-sm text-gray-600 hover:text-brand-light"> |
| 116 | + New |
| 117 | </a> |
| 118 | {% endif %} |
| 119 |
| --- templates/includes/sidebar.html | |
| +++ templates/includes/sidebar.html | |
| @@ -108,11 +108,11 @@ | |
| 108 | <a href="{% url 'pages:detail' slug=p.slug %}" |
| 109 | class="block rounded-md px-3 py-1.5 text-sm {% if p.slug in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %} truncate"> |
| 110 | {{ p.name }} |
| 111 | </a> |
| 112 | {% endfor %} |
| 113 | {% if user.is_superuser %} |
| 114 | <a href="{% url 'pages:create' %}" |
| 115 | class="block rounded-md px-3 py-1.5 text-sm text-gray-600 hover:text-brand-light"> |
| 116 | + New |
| 117 | </a> |
| 118 | {% endif %} |
| 119 |