master #1

Merged
lino.jorzick merged 203 commits from External/greenlight:master into master 2021-10-02 18:19:43 +00:00
3 changed files with 6 additions and 5 deletions
Showing only changes of commit f37f4c1ef4 - Show all commits

View File

@ -146,12 +146,12 @@ class SessionsController < ApplicationController
ldap_config[:uid] = ENV['LDAP_UID']
if params[:session][:username].blank? || session_params[:password].blank?
return redirect_to(ldap_signin_path, alert: I18n.t("invalid_credentials"))
return redirect_to(ldap_signin_path, alert: I18n.t("invalid_credentials_external"))
end
result = send_ldap_request(params[:session], ldap_config)
return redirect_to(ldap_signin_path, alert: I18n.t("invalid_credentials")) unless result
return redirect_to(ldap_signin_path, alert: I18n.t("invalid_credentials_external")) unless result
@auth = parse_auth(result.first, ENV['LDAP_ROLE_FIELD'], ENV['LDAP_ATTRIBUTE_MAPPING'])

View File

@ -314,6 +314,7 @@ en:
home_room: Home Room
info_update_success: Information successfully updated.
invalid_credentials: The email and password you entered did not match our records. Try again or click Forgot Password to reset your password.
invalid_credentials_external: The email and password you entered did not match our records. Please try again.
invalid_login_method: Login failed due to account mismatch. You need to log in with omniauth.
invite_message: "To invite someone to the meeting, send them this link:"
javascript:

View File

@ -658,7 +658,7 @@ describe SessionsController, type: :controller do
}
expect(response).to redirect_to(ldap_signin_path)
expect(flash[:alert]).to eq(I18n.t("invalid_credentials"))
expect(flash[:alert]).to eq(I18n.t("invalid_credentials_external"))
end
it "redirects to signin if no password provided" do
@ -672,7 +672,7 @@ describe SessionsController, type: :controller do
}
expect(response).to redirect_to(ldap_signin_path)
expect(flash[:alert]).to eq(I18n.t("invalid_credentials"))
expect(flash[:alert]).to eq(I18n.t("invalid_credentials_external"))
end
it "redirects to signin if no username provided" do
@ -686,7 +686,7 @@ describe SessionsController, type: :controller do
}
expect(response).to redirect_to(ldap_signin_path)
expect(flash[:alert]).to eq(I18n.t("invalid_credentials"))
expect(flash[:alert]).to eq(I18n.t("invalid_credentials_external"))
end
end
end