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>
pull/54145/head
Daniel Calviño Sánchez 2025-07-18 20:54:07 +07:00 committed by backportbot[bot]
parent f5409c6217
commit 6ff15ef530
1 changed files with 2 additions and 0 deletions

@ -67,6 +67,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;