Students can not become a mentor or org_admin in the same program.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/views/models/mentor.py Tue Feb 17 19:33:54 2009 +0000
+++ b/app/soc/views/models/mentor.py Tue Feb 17 19:35:00 2009 +0000
@@ -56,7 +56,8 @@
rights['delete'] = ['checkIsDeveloper']
# TODO accessCheck checkIsAdministratorForOrg
rights['invite'] = ['checkIsDeveloper']
- rights['accept_invite'] = [('checkCanCreateFromRequest', 'mentor')]
+ rights['accept_invite'] = [('checkCanCreateFromRequest', 'mentor'),
+ 'checkIsNotStudentForProgramOfOrg']
# TODO accessCheck checkIsAdministratorForOrg
rights['process_request'] = ['checkIsDeveloper',
('checkCanProcessRequest', 'mentor')]
--- a/app/soc/views/models/org_admin.py Tue Feb 17 19:33:54 2009 +0000
+++ b/app/soc/views/models/org_admin.py Tue Feb 17 19:35:00 2009 +0000
@@ -61,7 +61,8 @@
rights['delete'] = ['checkIsDeveloper']
# TODO accessCheck checkIsAdministratorForOrg
rights['invite'] = ['checkIsDeveloper']
- rights['accept_invite'] = [('checkCanCreateFromRequest', 'org_admin')]
+ rights['accept_invite'] = [('checkCanCreateFromRequest', 'org_admin'),
+ 'checkIsNotStudentForProgramOfOrg']
# TODO accessCheck checkIsAdministratorForOrg
rights['process_request'] = ['checkIsDeveloper',
('checkCanProcessRequest', 'org_admin')]