diff --git a/src/postorius/auth/decorators.py b/src/postorius/auth/decorators.py index fed0033..fc279ce 100644 --- a/src/postorius/auth/decorators.py +++ b/src/postorius/auth/decorators.py @@ -82,13 +82,18 @@ if getattr(user, 'is_list_owner', None): return fn(*args, **kwargs) if getattr(user, 'is_list_moderator', None): - return fn(*args, **kwargs) + return fn(*args, **kwargs) mlist = List.objects.get_or_404(fqdn_listname=list_id) if user.email not in mlist.moderators and \ user.email not in mlist.owners: raise PermissionDenied - else: - user.is_list_moderator = True + else: + if user.email in mlist.moderators and \ + user.email not in mlist.owners: + user.is_list_moderator = True + else: + user.is_list_moderator = True + user.is_list_owner = True return fn(*args, **kwargs) return wrapper diff --git a/src/postorius/templates/postorius/menu/list_nav.html b/src/postorius/templates/postorius/menu/list_nav.html index 1af4c90..333cbf1 100644 --- a/src/postorius/templates/postorius/menu/list_nav.html +++ b/src/postorius/templates/postorius/menu/list_nav.html @@ -9,13 +9,13 @@ {% if user.is_superuser or user.is_list_owner %}
  • {% trans "Members" %}
  • {% endif %} - {% if user.is_superuser or user.is_list_moderator %} + {% if user.is_superuser or user.is_list_owner or user.is_list_moderator %}
  • {% trans "Held Messages" %}
  • {% endif %} {% if user.is_superuser or user.is_list_owner %}
  • {% trans "Settings" %}
  • {% endif %} - {% if user.is_superuser or user.is_list_moderator %} + {% if user.is_superuser or user.is_list_owner or user.is_list_moderator %}
  • {% trans "Mass Subscribe" %}
  • {% endif %} {% if user.is_superuser or user.is_list_owner %}