mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-30 05:21:08 +00:00
Only show themes to sys admin
This commit is contained in:
parent
a2874bf460
commit
845bd2cc0d
2 changed files with 4 additions and 2 deletions
|
@ -110,10 +110,12 @@
|
||||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Registration" %}</a>
|
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Registration" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
|
{% if perms.bookwyrm.system_administration %}
|
||||||
<li>
|
<li>
|
||||||
{% url 'settings-themes' as url %}
|
{% url 'settings-themes' as url %}
|
||||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Themes" %}</a>
|
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Themes" %}</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -12,7 +12,7 @@ from bookwyrm import forms, models
|
||||||
# pylint: disable= no-self-use
|
# pylint: disable= no-self-use
|
||||||
@method_decorator(login_required, name="dispatch")
|
@method_decorator(login_required, name="dispatch")
|
||||||
@method_decorator(
|
@method_decorator(
|
||||||
permission_required("bookwyrm.edit_instance_settings", raise_exception=True),
|
permission_required("bookwyrm.system_administration", raise_exception=True),
|
||||||
name="dispatch",
|
name="dispatch",
|
||||||
)
|
)
|
||||||
class Themes(View):
|
class Themes(View):
|
||||||
|
@ -46,7 +46,7 @@ def get_view_data():
|
||||||
|
|
||||||
|
|
||||||
@require_POST
|
@require_POST
|
||||||
@permission_required("bookwyrm.edit_instance_settings", raise_exception=True)
|
@permission_required("bookwyrm.system_administration", raise_exception=True)
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def delete_theme(request, theme_id):
|
def delete_theme(request, theme_id):
|
||||||
"""Remove a theme"""
|
"""Remove a theme"""
|
||||||
|
|
Loading…
Reference in a new issue