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
This commit is contained in:
commit
f657f0c455
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue