app/soc/views/helper/access.py
changeset 1557 9e32e6258319
parent 1555 cba45797f4b9
child 1558 5ff25327371e
--- a/app/soc/views/helper/access.py	Sat Feb 28 12:11:20 2009 +0000
+++ b/app/soc/views/helper/access.py	Sat Feb 28 12:32:52 2009 +0000
@@ -726,8 +726,20 @@
     Only roles where the link_id matches the link_id from the
     django_args are considered.
     """
+
     self._checkHasActiveRoleFor(django_args, logic, 'link_id')
 
+  def checkHasActiveRoleForLinkIdAsScope(self, django_args, logic):
+    """Checks that the user has the specified active role.
+
+    Only roles where the link_id matches the link_id from the
+    django_args are considered.
+    """
+
+    django_args = django_args.copy()
+    django_args['scope_path'] = django_args['link_id']
+    self._checkHasActiveRoleFor(django_args, logic, 'scope_path')
+
   def checkHasDocumentAccess(self, django_args, logic, target_scope):
     """Checks that the user has access to the specified document scope.
     """