Skip to content

fix(LoginHomeComponent): Signing in to a closed site says the password is wrong - #2381

Open
Isaries wants to merge 1 commit into
WISE-Community:developfrom
Isaries:fix/login-disabled-message
Open

Isaries wants to merge 1 commit into
WISE-Community:developfrom
Isaries:fix/login-disabled-message

Conversation

@Isaries

@Isaries Isaries commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

When an administrator disables sign-in, everyone else who signs in with the correct password is told "Username and password not recognized. Please try again." LoginHomeComponent.login() treats any unauthenticated answer that is not a reCAPTCHA failure as a wrong password.

People who are told their password is wrong tend to retry, reset it, or ask their teacher for a new one, none of which helps while the site is closed.

Changes

  • When the sign-in response carries isLoginDisabled, the page shows "Signing in is disabled right now. Please try again later." instead of the password error. WISE-API#369 makes the backend send that response; today it redirects to a page that does not exist.
  • The same message is shown when the page is opened with ?loginDisabled=true, which is where a session that is signed out because sign-in was disabled is sent by WISE-Client#2382. The new string is added to messages.xlf.

Test

  • Two new cases in login-home.component.spec.ts: a sign-in answered with {"status":"error","isLoginDisabled":true}, and the page opened with ?loginDisabled=true, both show only the sign-in disabled message. Against the current develop the first fails with Expected $[0] = 'Username and password not recognized. Please try again.' to equal 'Signing in is disabled right now. Please try again later.'.
  • All specs under src/app/login and user.service.spec.ts pass.

…d is wrong

When an administrator has disabled sign-in, the sign-in page tells
everyone else "Username and password not recognized", because any
unauthenticated answer that is not a reCAPTCHA failure is treated as a
wrong password. The page now shows that signing in is disabled when the
response carries isLoginDisabled, which the backend sends once it
refuses the sign-in with a JSON body instead of a redirect. The same
message is shown when the page is opened with ?loginDisabled=true, so a
session signed out because sign-in was disabled can be told why.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant