provide password retrieval for person-based authenticator

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3565 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2009-09-29 14:56:52 +00:00
parent cdb50505e2
commit 9661f62155

View file

@ -93,6 +93,11 @@ class PersonBasedAuthenticator(Persistent, Contained):
getParent(self).prefix + self.prefix + login)
pa[self.passwordKey] = password
def getPassword(self, login):
pa = self.getPrincipalAnnotations(
getParent(self).prefix + self.prefix + login)
return pa.get(self.passwordKey)
def getPrincipalAnnotations(self, id):
utility = component.getUtility(IPrincipalAnnotationUtility)
return utility.getAnnotationsById(id)