Commit 66284aff authored by Rafael Monnerat's avatar Rafael Monnerat

Revert "PasswordTool: Ignore entries which don't come from ERP5LoginUserManager"

This reverts commit 716493d6.

Rationale: If there are multiple entries on the list, it means that the
  acl_users are miss-configured, which is a problem. Since, by changing
  the password on one entry the other (zodb_users for example), can still
  rely on the previous value, making login fail anyway.

  So we drop this workarround.
parent e5aa970c
Pipeline #27205 failed with stage
in 0 seconds
......@@ -295,10 +295,10 @@ class PasswordTool(BaseTool):
return error("Date has expired.")
del self._password_request_dict[password_key]
portal = self.getPortalObject()
user_dict, = [x for x in portal.acl_users.searchUsers(
user_dict, = portal.acl_users.searchUsers(
login=register_user_login,
exact_match=True,) if 'login_list' in x]
exact_match=True,
)
login_dict, = user_dict['login_list']
login = portal.unrestrictedTraverse(login_dict['path'])
login.setPassword(password) # this will raise if password does not match policy
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment