X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/99afe0ce8700bf835ff7bbedf77bb46e58f996d8..222b91ba8896448e7a120103959760cb84d6db10:/MembershipTool.py?ds=inline diff --git a/MembershipTool.py b/MembershipTool.py index 5476987..0d7624e 100755 --- a/MembershipTool.py +++ b/MembershipTool.py @@ -77,26 +77,26 @@ class MembershipTool( BaseTool ): memberareaPortalType = 'Folder' - security.declareProtected(SetOwnPassword, 'setPassword') - def setPassword(self, password, domains=None): - '''Allows the authenticated member to set his/her own password. - ''' - user_folder = self.__getPUS() - if user_folder.meta_type == 'Group User Folder' : - registration = getToolByName(self, 'portal_registration', None) - if not self.isAnonymousUser(): - member = self.getAuthenticatedMember() - if registration: - failMessage = registration.testPasswordValidity(password) - if failMessage is not None: - raise 'Bad Request', failMessage - member.setSecurityProfile(password=password, domains=domains) - member.changePassword(password) - else: - raise 'Bad Request', 'Not logged in.' - - else : - BaseTool.setPassword(self, password, domains=None) +# security.declareProtected(SetOwnPassword, 'setPassword') +# def setPassword(self, password, domains=None): +# '''Allows the authenticated member to set his/her own password. +# ''' +# user_folder = self.__getPUS() +# if user_folder.meta_type == 'Group User Folder' : +# registration = getToolByName(self, 'portal_registration', None) +# if not self.isAnonymousUser(): +# member = self.getAuthenticatedMember() +# if registration: +# failMessage = registration.testPasswordValidity(password) +# if failMessage is not None: +# raise 'Bad Request', failMessage +# member.setSecurityProfile(password=password, domains=domains) +# member.changePassword(password) +# else: +# raise 'Bad Request', 'Not logged in.' +# +# else : +# BaseTool.setPassword(self, password, domains=None) @@ -243,7 +243,7 @@ class MembershipTool( BaseTool ): return userid memberName = getattr(member, 'name', '') memberGivenName = getattr(member, 'given_name', '') - memberId = member.id + memberId = member.getId() memberFullName = formatFullName(memberName, memberGivenName, memberId, nameBefore = nameBefore) return memberFullName