Skip to content
Snippets Groups Projects
Unverified Commit f657f0c4 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

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
parents 0247f22c a223f603
Loading
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment