X-Git-Url: https://scm.cri.mines-paristech.fr/git/Plinn.git/blobdiff_plain/9dbf7a7a52bc8ae454d8770edaafaefc8621536d..4a062898ae723db4755a4c900eb3bc66393f6c48:/MembershipTool.py diff --git a/MembershipTool.py b/MembershipTool.py index d60ed39..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)