aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-11-05 23:39:13 +0100
committerGitHub <noreply@github.com>2020-11-05 23:39:13 +0100
commitf657f0c4551b2319dcfbc2bf477c9ae6e790dcf5 (patch)
treea83f1cf2ff05d94032f41ba0c2123bbe94553a9d
parent0247f22c837d515458b0c1d3a34d904ce8001930 (diff)
parenta223f603f95ad14d66226118b597bb1c97a1d1da (diff)
downloadnextcloud-server-f657f0c4551b2319dcfbc2bf477c9ae6e790dcf5.tar.gz
nextcloud-server-f657f0c4551b2319dcfbc2bf477c9ae6e790dcf5.zip
Merge pull request #23906 from nextcloud/techdebt/noid/simplify-can-change-user-pasword
Simplify the check if admin can change password based on encryption status
-rw-r--r--apps/settings/lib/Controller/UsersController.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php
index b9d20f5c0de..cad21c5f3b3 100644
--- a/apps/settings/lib/Controller/UsersController.php
+++ b/apps/settings/lib/Controller/UsersController.php
@@ -318,10 +318,8 @@ class UsersController extends Controller {
$noUserSpecificEncryptionKeys = true;
$isEncryptionModuleLoaded = false;
}
-
- $canChangePassword = ($isEncryptionEnabled && $isEncryptionModuleLoaded && $noUserSpecificEncryptionKeys)
- || (!$isEncryptionEnabled && !$isEncryptionModuleLoaded)
- || (!$isEncryptionEnabled && $isEncryptionModuleLoaded && $noUserSpecificEncryptionKeys);
+ $canChangePassword = ($isEncryptionModuleLoaded && $noUserSpecificEncryptionKeys)
+ || (!$isEncryptionModuleLoaded && !$isEncryptionEnabled);
return $canChangePassword;
}