Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix change password on Plone 5.2. #561

Merged
merged 2 commits into from Jun 24, 2018

Conversation

Projects
None yet
5 participants
@sunew
Copy link
Contributor

sunew commented Jun 24, 2018

After the change of MemberData to MemberAdapter, there is no longer a method userSetPassword of the user instance. Using the same approach as the PasswordResetTool.

@sunew sunew requested review from tisto and lukasgraf Jun 24, 2018

@tisto tisto requested a review from csenger Jun 24, 2018

except AttributeError:
# plone >= 5.2
acl_users = getToolByName(self.context, 'acl_users')
acl_users.userSetPassword(user.getUserId(), value)

This comment has been minimized.

@davisagli

davisagli Jun 24, 2018

Member

Any reason not to do it this way on older versions of Plone too?

This comment has been minimized.

@sunew

sunew Jun 24, 2018

Author Contributor

hmm, not really, I guess it works there also.
Did not want to change previous behavior though. But would be cleaner.
@tisto @lukasgraf opinions?

This comment has been minimized.

@lukasgraf

lukasgraf Jun 24, 2018

Member

If it works, I'm all for removing unnecessary conditionals.

@coveralls

This comment has been minimized.

Copy link

coveralls commented Jun 24, 2018

Coverage Status

Coverage increased (+0.002%) to 96.211% when pulling 75266e3 on fix-password-reset-52 into 8fc8060 on master.

Fix change password on Plone 5.2. After the change of MemberData to M…
…emberAdapter, there is no longer a method userSetPassword of the user instance. Using the same approach as the PasswordResetTool.

@sunew sunew force-pushed the fix-password-reset-52 branch from 7f3725d to 74a187b Jun 24, 2018

@sunew

This comment has been minimized.

Copy link
Contributor Author

sunew commented Jun 24, 2018

@davisagli fixed :) (and tested - it works w plone 4 and 5.0)

@tisto

tisto approved these changes Jun 24, 2018

@tisto tisto added this to the 2.x.x milestone Jun 24, 2018

@tisto tisto merged commit 2c1f9f6 into master Jun 24, 2018

4 checks passed

code-quality/landscape Landscape has completed the code quality check
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.002%) to 96.211%
Details

@tisto tisto deleted the fix-password-reset-52 branch Jun 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.