Skip to content

Expose password confirmation capabilities in the user backend - #11786

Merged
MorrisJobke merged 5 commits into
masterfrom
feature/password_confirmation_backend
Nov 5, 2018
Merged

Expose password confirmation capabilities in the user backend#11786
MorrisJobke merged 5 commits into
masterfrom
feature/password_confirmation_backend

Conversation

@rullzer

@rullzerrullzer commented Oct 11, 2018

Copy link
Copy Markdown
Member

This will allow user backends to expose if a users password can be validated. This can be useful in several places and allows us to proper do instanceof checks instead of magic string comparisons.

@blizzz as discussed.

@rullzerrullzer added this to the Nextcloud 15 milestone Oct 11, 2018
Comment threadlib/public/IUser.php
Comment threadlib/private/User/User.php
Comment threadlib/public/IUser.php Outdated
public function getBackendClassName();

/**
* Get the backend for the ccurrent user object

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@rullzerrullzer added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 31, 2018
@rullzer
rullzerforce-pushed the feature/password_confirmation_backend branch from 9f6327b to d8fb024CompareNovember 2, 2018 11:33
@rullzer

Copy link
Copy Markdown
MemberAuthor

All done.
Added a commit to have the property also set properly in the JS

On some backends (saml for example) users can't revalidate their
passwords as Nextcloud has no way to do verify it.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
If the userbackend doesn't allow validating the password for a given uid
then there is no need to perform this check.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer
rullzerforce-pushed the feature/password_confirmation_backend branch from d8fb024 to 90c4b7dCompareNovember 2, 2018 12:45

@ChristophWurstChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code makes sense 👍 Tested and works 🎉

@MorrisJobke
MorrisJobke merged commit 411d2de into masterNov 5, 2018
@MorrisJobke
MorrisJobke deleted the feature/password_confirmation_backend branch November 5, 2018 23:44
@MorrisJobke

Copy link
Copy Markdown
Member

[ ] once this is in we should implement #12085 with this approach here

@rullzer Is there already a ticket for this?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@rullzer@MorrisJobke@ChristophWurst@blizzz@kesselb