aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin
diff options
context:
space:
mode:
authorSebastian Spaeth <Sebastian@SSpaeth.de>2012-11-15 15:41:06 +0100
committerSebastian Spaeth <Sebastian@SSpaeth.de>2012-11-29 09:10:43 +0100
commit60de3209b923db71fc126bca4c34e0bf34752726 (patch)
tree0ffccd68f8ef8e2404ae6487dc1cedd68d8d9558 /mediagoblin
parent6b5f1ca79b42b977ea5f436ac7ab329fd2da1b6b (diff)
downloadmediagoblin-60de3209b923db71fc126bca4c34e0bf34752726.tar.lz
mediagoblin-60de3209b923db71fc126bca4c34e0bf34752726.tar.xz
mediagoblin-60de3209b923db71fc126bca4c34e0bf34752726.zip
Return code 403 when accessing admin pages
without being an admin. Previously we were just returning a 404 page and this confused the heck out of me, as I did not understand why the admin pages were not there at all (I was no admin). Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin')
-rw-r--r--mediagoblin/admin/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mediagoblin/admin/views.py b/mediagoblin/admin/views.py
index e6a3eac3..9c14c55c 100644
--- a/mediagoblin/admin/views.py
+++ b/mediagoblin/admin/views.py
@@ -14,18 +14,19 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from mediagoblin.tools.response import render_to_response, render_404
from mediagoblin.db.util import DESCENDING
from mediagoblin.decorators import require_active_login
-
+from mediagoblin.tools.response import (render_to_response, render_403,
+ render_404)
@require_active_login
def admin_processing_panel(request):
'''
Show the global processing panel for this instance
'''
+ # TODO: Why not a "require_admin_login" decorator throwing a 403 exception?
if not request.user.is_admin:
- return render_404(request)
+ return render_403(request)
processing_entries = request.db.MediaEntry.find(
{'state': u'processing'}).sort('created', DESCENDING)