656 self.deny(django_args) |
656 self.deny(django_args) |
657 |
657 |
658 new_args = {'scope_path': program.scope_path } |
658 new_args = {'scope_path': program.scope_path } |
659 self.checkHasRole(new_args, host_logic) |
659 self.checkHasRole(new_args, host_logic) |
660 |
660 |
|
661 |
|
662 @allowDeveloper |
|
663 def checkCanEditGroupApp(self, django_args, group_app_logic): |
|
664 """Checks if the group_app in args is valid to be edited. |
|
665 |
|
666 Args: |
|
667 group_app_logic: A logic instance for the Group Application |
|
668 """ |
|
669 |
|
670 self.checkIsUser(django_args) |
|
671 |
|
672 fields = { |
|
673 'link_id': django_args['link_id'], |
|
674 'applicant': self.user, |
|
675 'status' : ['needs review', 'rejected'] |
|
676 } |
|
677 |
|
678 if 'scope_path' in django_args: |
|
679 fields['scope_path'] = django_args['scope_path'] |
|
680 |
|
681 entity = group_app_logic.getForFields(fields) |
|
682 |
|
683 if entity: |
|
684 return |
|
685 |
|
686 raise out_of_band.AccessViolation(message_fmt=DEF_NOT_YOUR_ENTITY_MSG) |
|
687 |
|
688 |
661 @allowDeveloper |
689 @allowDeveloper |
662 def checkIsApplicationAccepted(self, django_args, app_logic): |
690 def checkIsApplicationAccepted(self, django_args, app_logic): |
663 """Returns an alternate HTTP response if Google Account has no Club App |
691 """Returns an alternate HTTP response if Google Account has no Club App |
664 entity for the specified Club. |
692 entity for the specified Club. |
665 |
693 |