Skip to content

Commit

Permalink
Feature #26: handle the User_Disabled exception and report an error m…
Browse files Browse the repository at this point in the history
…essage
  • Loading branch information
stcarrez committed Sep 17, 2022
1 parent 25760c2 commit 282827f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions awa/bundles/users.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ login_submit_login_title=Login using email and password
login_openid_title=Connect with...
login_classic_title=Connect with your email and password
login_signup_fail_message=Invalid email address or password.
login_signup_account_disabled_message=This user account is disabled.
openid_google_auth=Authenticate with Google
openid_yahoo_auth=Authenticate with Yahoo!
openid_orange_auth=Authenticate with Orange
Expand Down
1 change: 1 addition & 0 deletions awa/bundles/users_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ lost_password_create_account_link=Créer un compte
lost_password_create_account_title=Créer un compte
login_classic_title=Connexion avec l'adresse e-mail et un mot de passe
login_signup_fail_message=Adresse e-mail ou mot de passe invalide.
login_signup_account_disabled_message=Ce compte est désactivé.
openid_google_auth=Connexion avec votre compte Google
openid_yahoo_auth=Connexion avec votre compte Yahoo!
openid_orange_auth=Connexion avec votre compte Orange
Expand Down
5 changes: 5 additions & 0 deletions awa/src/awa-users-beans.adb
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ package body AWA.Users.Beans is
Outcome := To_Unbounded_String ("failure");

ASF.Applications.Messages.Factory.Add_Message ("users.login_signup_fail_message");

when Services.User_Disabled =>
Outcome := To_Unbounded_String ("failure");

ASF.Applications.Messages.Factory.Add_Message ("users.login_signup_account_disabled_message");
end Authenticate_User;

-- ------------------------------
Expand Down

0 comments on commit 282827f

Please sign in to comment.