diff options
author | Madhusudan.C.S | 2011-02-09 03:24:40 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2011-02-09 03:24:40 +0530 |
commit | e820300c671ba578da8867d9a72d4b3b9354ce3f (patch) | |
tree | 2616905127fda11e4bf19e577d083d3428ba68d7 | |
parent | dae126ab6b54513f7c8eb459d49d0872a9c00aee (diff) | |
download | pytask-e820300c671ba578da8867d9a72d4b3b9354ce3f.tar.gz pytask-e820300c671ba578da8867d9a72d4b3b9354ce3f.tar.bz2 pytask-e820300c671ba578da8867d9a72d4b3b9354ce3f.zip |
Raise UnauthorizedAccess exception in such a violation instead of Http404.
-rwxr-xr-x | pytask/taskapp/views/task.py | 5 |
1 files changed, 4 insertions, 1 deletions
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 |