equal
deleted
inserted
replaced
1427 message_fmt=DEF_NOT_YOUR_ENTITY_MSG) |
1427 message_fmt=DEF_NOT_YOUR_ENTITY_MSG) |
1428 |
1428 |
1429 return |
1429 return |
1430 |
1430 |
1431 @allowDeveloper |
1431 @allowDeveloper |
|
1432 def checkIsHostForStudentProject(self, django_args): |
|
1433 """Checks whether the user is Host for the specified project. |
|
1434 |
|
1435 Args: |
|
1436 django_args: a dictionary with django's arguments |
|
1437 |
|
1438 Raises: |
|
1439 AccessViolationResponse: |
|
1440 - If there is no project found |
|
1441 - If the user is not a host for hte specified project |
|
1442 """ |
|
1443 |
|
1444 self.checkIsUser() |
|
1445 |
|
1446 project_entity = student_project_logic.getFromKeyFieldsOr404(django_args) |
|
1447 program_entity = project_entity.program |
|
1448 |
|
1449 new_args = {'scope_path': program_entity.scope_path } |
|
1450 self.checkHasActiveRoleForScope(new_args, host_logic) |
|
1451 |
|
1452 return |
|
1453 |
|
1454 @allowDeveloper |
1432 def checkStudentProjectHasStatus(self, django_args, allowed_status): |
1455 def checkStudentProjectHasStatus(self, django_args, allowed_status): |
1433 """Checks whether the Project has one of the given statuses. |
1456 """Checks whether the Project has one of the given statuses. |
1434 |
1457 |
1435 Args: |
1458 Args: |
1436 django_args: a dictionary with django's arguments |
1459 django_args: a dictionary with django's arguments |