Permalink
Browse files

Using PAS in place of membership tool to get the authenticated user

  • Loading branch information...
1 parent 40b722b commit 45903483017504064908a91d6214888b0caf5cb7 @glenfant committed Dec 7, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/aws/authrss/utils.py
@@ -30,8 +30,9 @@ def __enter__(self):
self.real_sm = getSecurityManager()
tokens_bucket = getUtility(ITokenManager)
user_id = tokens_bucket.userIdForToken(self.token)
- tools = getMultiAdapter((self.context, self.request), name=u'plone_tools')
- member = tools.membership().getMemberById(user_id)
+ portal_state = getMultiAdapter((self.context, self.request), name=u'plone_portal_state')
+ pas = portal_state.portal().acl_users
+ member = pas.getUserById(user_id)
if member is not None:
newSecurityManager(self.request, member)
else:

0 comments on commit 4590348

Please sign in to comment.