From e820300c671ba578da8867d9a72d4b3b9354ce3f Mon Sep 17 00:00:00 2001 From: Madhusudan.C.S Date: Wed, 9 Feb 2011 03:24:40 +0530 Subject: Raise UnauthorizedAccess exception in such a violation instead of Http404. --- pytask/taskapp/views/task.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pytask/taskapp/views/task.py b/pytask/taskapp/views/task.py index 08a6fd9..8506614 100755 --- a/pytask/taskapp/views/task.py +++ b/pytask/taskapp/views/task.py @@ -48,6 +48,9 @@ NO_EDIT_RIGHT = ugettext( NO_MOD_REVIEWERS_RIGHT = ugettext( "You are not authorized to moderate reviewers.") +NO_SELECT_USER = ugettext( + "You are not authorized to approve task claims.") + @login_required def create_task(request): @@ -644,7 +647,7 @@ def select_user(request, task_id): return show_msg(user, 'There are no pending claims for this task', task_url, 'view the task') else: - raise http.Http404 + raise exceptions.UnauthorizedAccess(NO_SELECT_USER) def suggest_task_tags(request): """Returns the tags matching the query for the AJAXy autocomplete -- cgit