# HG changeset patch # User Sverre Rabbelier # Date 1235823019 0 # Node ID 163c879d1ffe3f6ea15cafd087457da915ac4c6b # Parent 451c804c6aab71d089e37db8ddc609cfe483e319 Fixed a brown paper bag bug in _checkHasActiveRoleFor Also updated sponsor to not pass redundant arguments. diff -r 451c804c6aab -r 163c879d1ffe app/soc/views/helper/access.py --- 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) diff -r 451c804c6aab -r 163c879d1ffe app/soc/views/models/sponsor.py --- 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