diff --git a/src/postorius/auth/decorators.py b/src/postorius/auth/decorators.py index 2b0c2c6..bded4aa 100644 --- a/src/postorius/auth/decorators.py +++ b/src/postorius/auth/decorators.py @@ -51,14 +51,14 @@ """ def wrapper(*args, **kwargs): user = args[0].user - fqdn_listname = kwargs['fqdn_listname'] + list_id = kwargs['list_id'] if not user.is_authenticated(): raise PermissionDenied if user.is_superuser: return fn(*args, **kwargs) if getattr(user, 'is_list_owner', None): return fn(*args, **kwargs) - mlist = List.objects.get_or_404(fqdn_listname=fqdn_listname) + mlist = List.objects.get_or_404(fqdn_listname=list_id) if user.email not in mlist.owners: raise PermissionDenied else: @@ -69,12 +69,12 @@ def list_moderator_required(fn): """Check if the logged in user is a moderator of the given list. - Assumes that the request object is the first arg and that fqdn_listname + Assumes that the request object is the first arg and that list_id is present in kwargs. """ def wrapper(*args, **kwargs): user = args[0].user - fqdn_listname = kwargs['fqdn_listname'] + list_id = kwargs['list_id'] if not user.is_authenticated(): raise PermissionDenied if user.is_superuser: @@ -83,7 +83,7 @@ return fn(*args, **kwargs) if getattr(user, 'is_list_moderator', None): return fn(*args, **kwargs) - mlist = List.objects.get_or_404(fqdn_listname=fqdn_listname) + 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 diff --git a/src/postorius/templates/postorius/lists/confirm_delete.html b/src/postorius/templates/postorius/lists/confirm_delete.html index 5886d0d..535bef6 100644 --- a/src/postorius/templates/postorius/lists/confirm_delete.html +++ b/src/postorius/templates/postorius/lists/confirm_delete.html @@ -10,6 +10,6 @@
{% trans "All settings and membership data will be lost!" %}
{% endblock main %} diff --git a/src/postorius/templates/postorius/lists/confirm_remove_role.html b/src/postorius/templates/postorius/lists/confirm_remove_role.html index 4380f85..7dabcab 100644 --- a/src/postorius/templates/postorius/lists/confirm_remove_role.html +++ b/src/postorius/templates/postorius/lists/confirm_remove_role.html @@ -6,7 +6,7 @@ {% block main %}{% trans "Are you sure you want to remove?" %}
-