Using the new checkIsMyActiveRole check where necessary.
--- a/app/soc/modules/ghop/views/models/mentor.py Mon Sep 14 19:58:10 2009 +0200
+++ b/app/soc/modules/ghop/views/models/mentor.py Mon Sep 14 19:58:43 2009 +0200
@@ -52,9 +52,7 @@
rights = ghop_access.GHOPChecker(params)
rights['create'] = ['checkIsDeveloper']
- rights['edit'] = [('checkHasActiveRoleForScope',
- ghop_mentor_logic.logic),
- ('checkIsMyEntity', [ghop_mentor_logic.logic, 'user', True])]
+ rights['edit'] = [('checkIsMyActiveRole', ghop_mentor_logic.logic)]
rights['delete'] = ['checkIsDeveloper']
rights['invite'] = [('checkHasActiveRoleForScope',
ghop_org_admin_logic.logic)]
--- a/app/soc/modules/ghop/views/models/org_admin.py Mon Sep 14 19:58:10 2009 +0200
+++ b/app/soc/modules/ghop/views/models/org_admin.py Mon Sep 14 19:58:43 2009 +0200
@@ -50,8 +50,7 @@
rights = ghop_access.GHOPChecker(params)
rights['create'] = ['checkIsDeveloper']
rights['edit'] = [
- ('checkHasActiveRoleForScope', ghop_org_admin_logic.logic),
- ('checkIsMyEntity', [ghop_org_admin_logic.logic, 'user', True])]
+ ('checkIsMyActiveRole', ghop_org_admin_logic.logic)]
rights['delete'] = ['checkIsDeveloper']
rights['invite'] = [('checkHasActiveRoleForScope',
ghop_org_admin_logic.logic)]
--- a/app/soc/views/models/club_admin.py Mon Sep 14 19:58:10 2009 +0200
+++ b/app/soc/views/models/club_admin.py Mon Sep 14 19:58:43 2009 +0200
@@ -52,8 +52,7 @@
rights = access.Checker(params)
rights['create'] = ['checkIsDeveloper']
- rights['edit'] = [('checkHasActiveRoleForScope', club_admin_logic.logic),
- ('checkIsMyEntity', [club_admin_logic.logic, 'user', True])]
+ rights['edit'] = [('checkIsMyActiveRole', club_admin_logic.logic)]
rights['delete'] = ['checkIsDeveloper']
rights['invite'] = [('checkHasActiveRoleForScope', club_admin_logic.logic)]
rights['accept_invite'] = [('checkCanCreateFromRequest', 'club_admin')]
--- a/app/soc/views/models/club_member.py Mon Sep 14 19:58:10 2009 +0200
+++ b/app/soc/views/models/club_member.py Mon Sep 14 19:58:43 2009 +0200
@@ -53,8 +53,7 @@
rights = access.Checker(params)
rights['create'] = ['checkIsDeveloper']
- rights['edit'] = [('checkHasActiveRoleForScope', club_member_logic.logic),
- ('checkIsMyEntity', [club_member_logic.logic, 'user', True])]
+ rights['edit'] = [('checkIsMyActiveRole', club_member_logic.logic)]
rights['delete'] = ['checkIsDeveloper']
rights['invite'] = [('checkHasActiveRoleForScope', club_admin_logic.logic)]
rights['accept_invite'] = [('checkCanCreateFromRequest','club_member')]
--- a/app/soc/views/models/host.py Mon Sep 14 19:58:10 2009 +0200
+++ b/app/soc/views/models/host.py Mon Sep 14 19:58:43 2009 +0200
@@ -56,8 +56,7 @@
rights = access.Checker(params)
rights['create'] = [('checkHasActiveRoleForScope', host_logic.logic)]
- rights['edit'] = [('checkHasActiveRoleForScope', host_logic.logic),
- ('checkIsMyEntity', [host_logic.logic, 'user', True])]
+ rights['edit'] = [('checkIsMyActiveRole', host_logic.logic)]
rights['invite'] = [('checkHasActiveRoleForScope', host_logic.logic)]
rights['list'] = ['checkIsDeveloper']
rights['accept_invite'] = [('checkCanCreateFromRequest','host')]
--- a/app/soc/views/models/mentor.py Mon Sep 14 19:58:10 2009 +0200
+++ b/app/soc/views/models/mentor.py Mon Sep 14 19:58:43 2009 +0200
@@ -55,9 +55,7 @@
rights = access.Checker(params)
rights['create'] = ['checkIsDeveloper']
- rights['edit'] = [('checkHasActiveRoleForScope',
- soc.logic.models.mentor.logic),
- ('checkIsMyEntity', [soc.logic.models.mentor.logic, 'user', True])]
+ rights['edit'] = [('checkIsMyActiveRole', soc.logic.models.mentor.logic)]
rights['delete'] = ['checkIsDeveloper']
rights['invite'] = [('checkHasActiveRoleForScope',
soc.logic.models.org_admin.logic)]
--- a/app/soc/views/models/org_admin.py Mon Sep 14 19:58:10 2009 +0200
+++ b/app/soc/views/models/org_admin.py Mon Sep 14 19:58:43 2009 +0200
@@ -60,8 +60,7 @@
rights = access.Checker(params)
rights['create'] = ['checkIsDeveloper']
- rights['edit'] = [('checkHasActiveRoleForScope', org_admin_logic.logic),
- ('checkIsMyEntity', [org_admin_logic.logic, 'user', True])]
+ rights['edit'] = [('checkIsMyActiveRole', org_admin_logic.logic)]
rights['delete'] = ['checkIsDeveloper']
rights['invite'] = [('checkHasActiveRoleForScope',
org_admin_logic.logic)]
--- a/app/soc/views/models/student.py Mon Sep 14 19:58:10 2009 +0200
+++ b/app/soc/views/models/student.py Mon Sep 14 19:58:43 2009 +0200
@@ -60,8 +60,7 @@
rights = access.Checker(params)
rights['create'] = ['checkIsDeveloper']
- rights['edit'] = [('checkHasActiveRoleForScope', student_logic.logic),
- ('checkIsMyEntity', [student_logic.logic, 'user', True])]
+ rights['edit'] = [('checkIsMyActiveRole', student_logic.logic)]
rights['delete'] = ['checkIsDeveloper']
rights['apply'] = [
'checkIsUser',
@@ -69,8 +68,7 @@
['student_signup', 'scope_path', program_logic.logic]),
('checkIsNotParticipatingInProgramInScope', [program_logic.logic]),
]
- rights['manage'] = [('checkHasActiveRoleForScope', student_logic.logic),
- ('checkIsMyEntity', [student_logic.logic, 'user', True])]
+ rights['manage'] = [('checkIsMyActiveRole', student_logic.logic)]
rights['list_projects'] = [
('checkHasActiveRoleForScope', student_logic.logic),
('checkIsAfterEvent', ['accepted_students_announced_deadline',