Fixed a brown paper bag bug in _checkHasActiveRoleFor
Also updated sponsor to not pass redundant arguments.
--- a/app/soc/views/helper/access.py Sat Feb 28 11:19:17 2009 +0000
+++ b/app/soc/views/helper/access.py Sat Feb 28 12:10:19 2009 +0000
@@ -697,7 +697,7 @@
scope_path from the django_args are considered.
"""
- fields = ['scope_path', 'user']
+ fields = [field_name, 'user']
django_args['user'] = self.user
self._checkIsActive(django_args, logic, fields)
--- a/app/soc/views/models/sponsor.py Sat Feb 28 11:19:17 2009 +0000
+++ b/app/soc/views/models/sponsor.py Sat Feb 28 12:10:19 2009 +0000
@@ -50,13 +50,13 @@
rights = access.Checker(params)
rights['create'] = ['checkIsDeveloper']
- rights['edit'] = [('checkHasActiveRoleForScope', [host_logic, 'link_id']),
+ rights['edit'] = [('checkHasActiveRoleForLinkId', host_logic),
('checkGroupIsActiveForLinkId', sponsor_logic)]
rights['delete'] = ['checkIsDeveloper']
rights['home'] = [('checkHasActiveRoleForScope', host_logic)]
rights['list'] = ['checkIsDeveloper']
- rights['list_requests'] = [('checkHasActiveRoleForScope', [host_logic, 'link_id'])]
- rights['list_roles'] = [('checkHasActiveRoleForScope', [host_logic, 'link_id'])]
+ rights['list_requests'] = [('checkHasActiveRoleForScope', host_logic)]
+ rights['list_roles'] = [('checkHasActiveRoleForScope', host_logic)]
new_params = {}
new_params['logic'] = soc.logic.models.sponsor.logic