app/soc/views/helper/access.py
changeset 2922 6e373954bbf6
parent 2918 d24b80677879
child 2936 75f9c945ed8a
equal deleted inserted replaced
2921:8170c1de0ca6 2922:6e373954bbf6
  1157                                              backup_admin == user):
  1157                                              backup_admin == user):
  1158       return
  1158       return
  1159 
  1159 
  1160     raise out_of_band.AccessViolation(message_fmt=DEF_NO_APPLICATION_MSG)
  1160     raise out_of_band.AccessViolation(message_fmt=DEF_NO_APPLICATION_MSG)
  1161 
  1161 
  1162   def checkIsNotParticipatingInProgramInScope(self, django_args, program_logic):
  1162   def checkIsNotParticipatingInProgramInScope(self, django_args, program_logic,
       
  1163                                               student_logic, org_admin_logic,
       
  1164                                               mentor_logic):
  1163     """Checks if the current user has no roles for the given 
  1165     """Checks if the current user has no roles for the given 
  1164        program in django_args.
  1166        program in django_args.
  1165 
  1167 
  1166     Args:
  1168     Args:
  1167       django_args: a dictionary with django's arguments
  1169       django_args: a dictionary with django's arguments
  1168       program_logic: Program Logic instance
  1170       program_logic: Program Logic instance
       
  1171       student_logic: Student Logic instance
       
  1172       org_admin_logic: Org Admin Logic instance
       
  1173       mentor_logic: Mentor Logic instance
  1169 
  1174 
  1170      Raises:
  1175      Raises:
  1171        AccessViolationResponse: if the current user has a student, mentor or
  1176        AccessViolationResponse: if the current user has a student, mentor or
  1172                                 org admin role for the given program.
  1177                                 org admin role for the given program.
  1173     """
  1178     """