diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index 2b8364ec9..43ca81c74 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -109,17 +109,17 @@ {% trans 'Settings' %} - {% if perms.bookwyrm.create_invites or perms.moderate_users %} + {% if perms.bookwyrm.create_invites or perms.moderate_user %} {% endif %} - {% if perms.bookwyrm.create_invites %} + {% if perms.bookwyrm.create_invites and not site.allow_registration %}
  • {% trans 'Invites' %}
  • {% endif %} - {% if perms.bookwyrm.moderate_users %} + {% if perms.bookwyrm.moderate_user %}
  • {% trans 'Admin' %} diff --git a/bookwyrm/templates/settings/admin_layout.html b/bookwyrm/templates/settings/admin_layout.html index 9e57076bf..6d6516476 100644 --- a/bookwyrm/templates/settings/admin_layout.html +++ b/bookwyrm/templates/settings/admin_layout.html @@ -21,23 +21,29 @@ {% if perms.bookwyrm.create_invites %} {% endif %} {% if perms.bookwyrm.edit_instance_settings %} diff --git a/bookwyrm/views/user_admin.py b/bookwyrm/views/user_admin.py index 7cfefb0f4..3a9ea3392 100644 --- a/bookwyrm/views/user_admin.py +++ b/bookwyrm/views/user_admin.py @@ -13,7 +13,7 @@ from bookwyrm.settings import PAGE_LENGTH # pylint: disable= no-self-use @method_decorator(login_required, name="dispatch") @method_decorator( - permission_required("bookwyrm.moderate_users", raise_exception=True), + permission_required("bookwyrm.moderate_user", raise_exception=True), name="dispatch", ) class UserAdminList(View):