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 security settings if password change is disabled #10572

Merged
merged 1 commit into from
Aug 8, 2018

Conversation

juliusknorr
Copy link
Member

Fix for #10464

This will make sure the password change javascript is only included if it is needed as well as hide the whole password section when changing passwords is disabled.

Apply this patch to test:

--- a/lib/private/Settings/Personal/Security.php
+++ b/lib/private/Settings/Personal/Security.php
@@ -46,7 +46,7 @@ class Security implements ISettings {
                $user = $this->userManager->get(\OC_User::getUser());
                $passwordChangeSupported = false;
                if ($user !== null) {
-                       $passwordChangeSupported = $user->canChangePassword();
+                       $passwordChangeSupported = false;
                }
 
                return new TemplateResponse('settings', 'settings/personal/security', [

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

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

works, makes sense

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Code looks good, changes make sense 👍

@rullzer rullzer merged commit bee65f8 into master Aug 8, 2018
@rullzer rullzer deleted the bugfix/10464/security-password-change branch August 8, 2018 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants