Make use of default value
field_name is not modified and as such it is possible to properly use
the default value system (rather than just specifying None).
Patch by: Sverre Rabbelier
--- a/app/soc/views/helper/access.py Sat Feb 21 20:13:46 2009 +0000
+++ b/app/soc/views/helper/access.py Sat Feb 21 20:14:19 2009 +0000
@@ -625,13 +625,11 @@
raise out_of_band.AccessViolation(message_fmt=DEF_NO_ACTIVE_ENTITY_MSG)
- def checkHasActiveRoleForScope(self, django_args, logic, field_name=None):
+ def checkHasActiveRoleForScope(self, django_args, logic,
+ field_name='scope_path'):
"""Checks that the user has the specified active role.
"""
- if not field_name:
- field_name = 'scope_path'
-
django_args['user'] = self.user
self.checkIsActive(django_args, logic, field_name, 'user')