Commit 8289f58a authored by Simon Hanna's avatar Simon Hanna

Fix auth decorators

parent e589e8f3
......@@ -29,13 +29,13 @@ try:
except ImportError:
from urllib.error import HTTPError
from postorius import utils
from postorius.auth.decorators import superuser_or_403
from postorius.auth.decorators import superuser_required
from postorius.models import Domain, MailmanApiError
from postorius.forms import DomainNew
@login_required
@superuser_or_403
@superuser_required
def domain_index(request):
try:
existing_domains = Domain.objects.all()
......@@ -46,7 +46,7 @@ def domain_index(request):
@login_required
@superuser_or_403
@superuser_required
def domain_new(request):
if request.method == 'POST':
form = DomainNew(request.POST)
......@@ -71,7 +71,7 @@ def domain_new(request):
@login_required
@superuser_or_403
@superuser_required
def domain_delete(request, domain):
"""Deletes a domain but asks for confirmation first.
"""
......
......@@ -49,7 +49,7 @@ from postorius.forms import (
ListHeaderMatchForm, ListHeaderMatchFormset, MemberModeration)
from postorius.models import Domain, List, MailmanApiError, Mailman404Error
from postorius.auth.decorators import (
list_owner_required, list_moderator_required, superuser_or_403)
list_owner_required, list_moderator_required, superuser_required)
from postorius.views.generic import MailingListView
......@@ -493,7 +493,7 @@ def _get_choosable_domains(request):
@login_required
@superuser_or_403
@superuser_required
def list_new(request, template='postorius/lists/new.html'):
"""
Add a new mailing list.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment