fix: Do not show password dialog when user can not validate password

The password confirmation dialog is always shown unless the user backend
does not allow password confirmation. A user backend may explicitly
provide that information, but even if it does not that could have been
defined in the authentication token with
"IToken::SCOPE_SKIP_PASSWORD_VALIDATION" (for example, when "user_oidc"
is only used for authentication and user provision is done by another
user backend).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2025-07-18 20:54:07 +02:00 committed by backportbot[bot]
parent 6865f39d63
commit aa4e7f92f7

View file

@ -69,6 +69,8 @@ class JSConfigHelper {
$userBackendAllowsPasswordConfirmation = $backend->canConfirmPassword($uid) && $this->canUserValidatePassword();
} elseif (isset($this->excludedUserBackEnds[$this->currentUser->getBackendClassName()])) {
$userBackendAllowsPasswordConfirmation = false;
} else {
$userBackendAllowsPasswordConfirmation = $this->canUserValidatePassword();
}
} else {
$uid = null;