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>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if perms.bookwyrm.system_administration %}
|
||||
<li>
|
||||
{% url 'settings-themes' as url %}
|
||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Themes" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
|
|
@ -12,7 +12,7 @@ from bookwyrm import forms, models
|
|||
# pylint: disable= no-self-use
|
||||
@method_decorator(login_required, name="dispatch")
|
||||
@method_decorator(
|
||||
permission_required("bookwyrm.edit_instance_settings", raise_exception=True),
|
||||
permission_required("bookwyrm.system_administration", raise_exception=True),
|
||||
name="dispatch",
|
||||
)
|
||||
class Themes(View):
|
||||
|
@ -46,7 +46,7 @@ def get_view_data():
|
|||
|
||||
|
||||
@require_POST
|
||||
@permission_required("bookwyrm.edit_instance_settings", raise_exception=True)
|
||||
@permission_required("bookwyrm.system_administration", raise_exception=True)
|
||||
# pylint: disable=unused-argument
|
||||
def delete_theme(request, theme_id):
|
||||
"""Remove a theme"""
|
||||
|
|
Loading…
Reference in a new issue