pytask/taskapp/views/task.py
changeset 557 a8102f88008c
parent 556 a0e57ca7cf56
equal deleted inserted replaced
556:a0e57ca7cf56 557:a8102f88008c
    42   "flow may change. So all the claims submitted before the workshop may "
    42   "flow may change. So all the claims submitted before the workshop may "
    43   "not be valid.")
    43   "not be valid.")
    44 
    44 
    45 NO_EDIT_RIGHT = ugettext(
    45 NO_EDIT_RIGHT = ugettext(
    46   "You are not authorized to edit this page.")
    46   "You are not authorized to edit this page.")
       
    47 
       
    48 NO_MOD_REVIEWERS_RIGHT = ugettext(
       
    49   "You are not authorized to moderate reviewers.")
    47 
    50 
    48 
    51 
    49 @login_required
    52 @login_required
    50 def create_task(request):
    53 def create_task(request):
    51 
    54 
   375         can_mod_reviewers = True
   378         can_mod_reviewers = True
   376     else:
   379     else:
   377         can_mod_reviewers = False
   380         can_mod_reviewers = False
   378 
   381 
   379     if not can_mod_reviewers:
   382     if not can_mod_reviewers:
   380         raise http.Http404
   383         raise exceptions.UnauthorizedAccess(NO_MOD_REVIEWERS_RIGHT)
   381 
   384 
   382     context = {
   385     context = {
   383       'user': user,
   386       'user': user,
   384       'profile': profile,
   387       'profile': profile,
   385       'task': task,
   388       'task': task,