Org admins can now send out invitations and users can now request to become a mentor.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/views/models/mentor.py Tue Feb 17 21:16:35 2009 +0000
+++ b/app/soc/views/models/mentor.py Wed Feb 18 19:49:39 2009 +0000
@@ -54,12 +54,14 @@
rights['create'] = ['checkIsDeveloper']
rights['edit'] = [('checkHasActiveRoleForScope', soc.logic.models.mentor.logic)]
rights['delete'] = ['checkIsDeveloper']
- # TODO accessCheck checkIsAdministratorForOrg
- rights['invite'] = ['checkIsDeveloper']
+ rights['invite'] = [('checkHasActiveRoleForScope',
+ soc.logic.models.org_admin.logic)]
rights['accept_invite'] = [('checkCanCreateFromRequest', 'mentor'),
'checkIsNotStudentForProgramOfOrg']
- # TODO accessCheck checkIsAdministratorForOrg
- rights['process_request'] = ['checkIsDeveloper',
+ rights['request'] = ['checkIsNotStudentForProgramOfOrg',
+ ('checkCanMakeRequestToGroup', org_logic)]
+ rights['process_request'] = [
+ ('checkHasActiveRoleForScope', soc.logic.models.org_admin.logic),
('checkCanProcessRequest', 'mentor')]
rights['manage'] = [
('checkIsAllowedToManageRole', [soc.logic.models.mentor.logic,
--- a/app/soc/views/models/org_admin.py Tue Feb 17 21:16:35 2009 +0000
+++ b/app/soc/views/models/org_admin.py Wed Feb 18 19:49:39 2009 +0000
@@ -59,16 +59,16 @@
rights['create'] = ['checkIsDeveloper']
rights['edit'] = [('checkHasActiveRoleForScope', org_admin_logic.logic)]
rights['delete'] = ['checkIsDeveloper']
- # TODO accessCheck checkIsAdministratorForOrg
- rights['invite'] = ['checkIsDeveloper']
+ rights['invite'] = [('checkHasActiveRoleForScope',
+ org_admin_logic.logic)]
rights['accept_invite'] = [('checkCanCreateFromRequest', 'org_admin'),
'checkIsNotStudentForProgramOfOrg']
- # TODO accessCheck checkIsAdministratorForOrg
- rights['process_request'] = ['checkIsDeveloper',
+ rights['process_request'] = [
+ ('checkHasActiveRoleForScope', org_admin_logic.logic),
('checkCanProcessRequest', 'org_admin')]
rights['manage'] = [
- ('checkIsAllowedToManageRole', [soc.logic.models.org_admin.logic,
- soc.logic.models.org_admin.logic])]
+ ('checkIsAllowedToManageRole', [org_admin_logic.logic,
+ org_admin_logic.logic])]
new_params = {}
new_params['logic'] = soc.logic.models.org_admin.logic