Whoops! Looks like you used tabs instead of spaces. I'll fix it when I do the
merge, assuming my tests pass.
Diff comments:
> === modified file 'src/postorius/auth/decorators.py'
> --- src/postorius/auth/decorators.py 2015-02-09 14:35:44 +0000
> +++ src/postorius/auth/decorators.py 2015-04-13 21:09:22 +0000
> @@ -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)
I think this is a typo?
> 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
>
>
> === modified file 'src/postorius/templates/postorius/menu/list_nav.html'
> --- src/postorius/templates/postorius/menu/list_nav.html 2015-04-13
> 19:38:03 +0000
> +++ src/postorius/templates/postorius/menu/list_nav.html 2015-04-13
> 21:09:22 +0000
> @@ -9,7 +9,7 @@
> {% if user.is_superuser or user.is_list_owner %}
> <li class="mm_nav_item"><a class="{% nav_active_class current
> 'list_members' %}" href="{% url 'list_members' list.list_id %}">{% trans
> "Members" %}</a></li>
> {% endif %}
> - {% if user.is_superuser or user.is_list_moderator %}
> + {% if user.is_superuser or user.is_list_owner or
> user.is_list_moderator %}
> <li class="mm_nav_item"><a class="{% nav_active_class current
> 'list_held_messages' %}" href="{% url 'list_held_messages' list.list_id
> %}">{% trans "Held Messages" %}</a></li>
> {% endif %}
> {% if user.is_superuser or user.is_list_owner %}
>
--
https://code.launchpad.net/~bhavesh-goyal093/postorius/fixed-postorius-method-decorators/+merge/256037
Your team Mailman Coders is requested to review the proposed merge of
lp:~bhavesh-goyal093/postorius/fixed-postorius-method-decorators into
lp:postorius.
_______________________________________________
Mailman-coders mailing list
[email protected]
https://mail.python.org/mailman/listinfo/mailman-coders