X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/174c53e97bcf1e5412c141829d152aa5a2b8684c..988c0eb318f4af28bad7d7714e7410699d7cae30:/forum/views/admin.py diff --git a/forum/views/admin.py b/forum/views/admin.py index 52f9eee..ad4f9b9 100644 --- a/forum/views/admin.py +++ b/forum/views/admin.py @@ -3,7 +3,8 @@ import time from django.shortcuts import render_to_response, get_object_or_404 from django.core.urlresolvers import reverse -from django.http import HttpResponseRedirect, HttpResponse, HttpResponseForbidden, Http404 +from django.http import HttpResponseRedirect, HttpResponse, Http404 +from forum.http_responses import HttpResponseUnauthorized from django.template import RequestContext from django.utils.translation import ugettext as _ from django.utils import simplejson @@ -21,7 +22,7 @@ def super_user_required(fn): if request.user.is_authenticated() and request.user.is_superuser: return fn(request, *args, **kwargs) else: - return HttpResponseForbidden() + return HttpResponseUnauthorized(request) return wrapper @@ -36,7 +37,7 @@ def admin_page(fn): context['othersets'] = sorted( [s for s in Setting.sets.values() if not s.name in ('basic', 'users', 'email', 'paths', 'extkeys', 'repgain', 'minrep', 'voting', 'badges', 'about', 'faq', 'sidebar', - 'form', 'moderation', 'css', 'headandfoot', 'head')] + 'form', 'moderation', 'css', 'headandfoot', 'head', 'view')] , lambda s1, s2: s1.weight - s2.weight) unsaved = request.session.get('previewing_settings', {})