login credentials check update. English locale fixed
This commit is contained in:
parent
8d71ccab1f
commit
b75ea3ab8d
|
@ -22,13 +22,8 @@ class RedmineOauthController < AccountController
|
|||
token = oauth_client.auth_code.get_token(params[:code], :redirect_uri => oauth_a2_callback_url)
|
||||
result = token.get(Setting.plugin_redmine_oauth2_a2[:a2_server_url] + '/idp/oauth2/user-info/')
|
||||
info = JSON.parse(result.body)
|
||||
if info && info["verified_email"]
|
||||
if allowed_domain_for?(info["email"])
|
||||
if info
|
||||
try_to_login info
|
||||
else
|
||||
flash[:error] = l(:notice_domain_not_allowed, :domain => parse_email(info["email"])[:domain])
|
||||
redirect_to signin_path
|
||||
end
|
||||
else
|
||||
flash[:error] = l(:notice_unable_to_obtain_a2_credentials)
|
||||
redirect_to signin_path
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
en:
|
||||
notice_unable_to_obtain_a2_credentials: "Unable to obtain credentials from Authentic."
|
||||
notice_domain_not_allowed: "You can not login using %{domain} domain."
|
||||
notice_access_denied: "You must allow to use you Google credentials to enter this site."
|
||||
notice_access_denied: "You must allow Authentic to use your credentials to enter this site."
|
||||
login_via_oauth2_a2: "Login via Authentic using OAuth2"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
ru:
|
||||
notice_unable_to_obtain_a2_credentials: "Не удалось получить данные от Authentic."
|
||||
notice_domain_not_allowed: "Вы не можете войти в систему при помощи домена %{domain}."
|
||||
notice_access_denied: "Для корректного входа необходимо разрешить приложению доступ к аккаунту."
|
||||
login_via_a2: "Войти с Authentic"
|
Reference in New Issue