Changed the access checks in the GSoC module to match the new checks.
authorLennard de Rijk <ljvderijk@gmail.com>
Sun, 25 Oct 2009 21:47:25 -0700
changeset 3057 966bbe3e204d
parent 3056 64bb50e94a37
child 3058 5395772146cc
Changed the access checks in the GSoC module to match the new checks.
app/soc/modules/gsoc/views/models/mentor.py
app/soc/modules/gsoc/views/models/org_admin.py
--- a/app/soc/modules/gsoc/views/models/mentor.py	Sun Oct 25 18:49:43 2009 -0700
+++ b/app/soc/modules/gsoc/views/models/mentor.py	Sun Oct 25 21:47:25 2009 -0700
@@ -51,16 +51,15 @@
     rights['edit'] = [('checkIsMyActiveRole', mentor_logic)]
     rights['delete'] = ['checkIsDeveloper']
     rights['invite'] = [('checkHasActiveRoleForScope', org_admin_logic)]
-    rights['accept_invite'] = [('checkCanCreateFromRequest', 'mentor'),
-        ('checkIsNotStudentForProgramOfOrg', [org_logic,
+    rights['accept_invite'] = ['checkCanCreateFromRequest',
+        ('checkIsNotStudentForProgramOfOrgInRequest', [org_logic,
                                               student_logic])]
     rights['request'] = [
         ('checkIsNotStudentForProgramOfOrg',
             [org_logic, student_logic]),
         ('checkCanMakeRequestToGroup', org_logic)]
     rights['process_request'] = [
-        ('checkHasActiveRoleForScope', org_admin_logic),
-        ('checkCanProcessRequest', 'mentor')]
+        ('checkCanProcessRequest', [[org_admin_logic]])]
     rights['manage'] = [
         ('checkIsAllowedToManageRole', [mentor_logic, org_admin_logic])]
 
--- a/app/soc/modules/gsoc/views/models/org_admin.py	Sun Oct 25 18:49:43 2009 -0700
+++ b/app/soc/modules/gsoc/views/models/org_admin.py	Sun Oct 25 21:47:25 2009 -0700
@@ -52,11 +52,11 @@
     rights['delete'] = ['checkIsDeveloper']
     rights['invite'] = [('checkHasActiveRoleForScope',
                          org_admin_logic)]
-    rights['accept_invite'] = [('checkCanCreateFromRequest', 'org_admin'),
-        ('checkIsNotStudentForProgramOfOrg', [org_logic, student_logic])]
+    rights['accept_invite'] = ['checkCanCreateFromRequest',
+        ('checkIsNotStudentForProgramOfOrgInRequest',
+         [org_logic, student_logic])]
     rights['process_request'] = [
-        ('checkHasActiveRoleForScope', org_admin_logic),
-        ('checkCanProcessRequest', 'org_admin')]
+        ('checkCanProcessRequest', [[org_admin_logic]])]
     rights['manage'] = [
         ('checkIsAllowedToManageRole', [org_admin_logic, org_admin_logic])]