Permalink
Browse files

add bootstrap south policy

  • Loading branch information...
1 parent 03a7c35 commit 7c0041102a9ec8b64a9bde10ccbef93c236abdad @reedobrien reedobrien committed Dec 6, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 lumin/security.py
View
13 lumin/security.py
@@ -34,3 +34,16 @@ def __call__(self, userid, request):
return groups
groupfinder = GroupFinder()
+
+
+class BootstrapAuthenticationPolicy(object):
+ def __init__(self, policy, *principals):
+ self.policy = policy
+ self.principals = list(principals)
+
+ def __getattr__(self, name):
+ return getattr(self.policy, name)
+
+ def effective_principals(self, request):
+ principals = self.policy.effective_principals(request)
+ return list(principals) + self.principals

0 comments on commit 7c00411

Please sign in to comment.