# HG changeset patch # User Madhusudan.C.S # Date 1296817676 -19800 # Node ID a8102f88008cfa7b6002b9c30588ef2b7947ba7b # Parent a0e57ca7cf56d36259fea47bdd7dde72df09e382 Use Unauthorized exception for access checks. diff -r a0e57ca7cf56 -r a8102f88008c pytask/taskapp/views/task.py --- a/pytask/taskapp/views/task.py Fri Feb 04 16:37:22 2011 +0530 +++ b/pytask/taskapp/views/task.py Fri Feb 04 16:37:56 2011 +0530 @@ -45,6 +45,9 @@ NO_EDIT_RIGHT = ugettext( "You are not authorized to edit this page.") +NO_MOD_REVIEWERS_RIGHT = ugettext( + "You are not authorized to moderate reviewers.") + @login_required def create_task(request): @@ -377,7 +380,7 @@ can_mod_reviewers = False if not can_mod_reviewers: - raise http.Http404 + raise exceptions.UnauthorizedAccess(NO_MOD_REVIEWERS_RIGHT) context = { 'user': user,