diff --git a/app/views/hooks/_view_account_login_bottom.html.erb b/app/views/hooks/_view_account_login_bottom.html.erb index fbda800..a538aa7 100644 --- a/app/views/hooks/_view_account_login_bottom.html.erb +++ b/app/views/hooks/_view_account_login_bottom.html.erb @@ -27,7 +27,7 @@ <%= button_tag(name: 'login-oauth', tabindex: 6, id: 'login-oauth-submit', title: l(:oauth_login_with), style: "background: #{Setting.plugin_redmine_oauth[:button_color]}") do %> - <%= l(:oauth_login_via, oauth: Setting.plugin_redmine_oauth[:custom_name].strip.empty? ? Setting.plugin_redmine_oauth[:oauth_name] : Setting.plugin_redmine_oauth[:custom_name]).html_safe %> + <%= l(:oauth_login_via, oauth: Setting.plugin_redmine_oauth[:custom_name].blank? ? Setting.plugin_redmine_oauth[:oauth_name] : Setting.plugin_redmine_oauth[:custom_name]).html_safe %> <% end %> <% end %> <% end %> diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 29daaf4..4b1ac5d 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -47,6 +47,6 @@ cs: oauth_custom_scope: OAuth scope oauth_custom_scope_info: OAuth scope (default - 'openid profile email') oauth_custom_uid_field: UID field - oauth_custom_uid_field_info: UID field (default - sub) + oauth_custom_uid_field_info: UID field (default - preferred_username) oauth_custom_email_field: Email field oauth_custom_email_field_info: Email field (default - email) diff --git a/config/locales/de.yml b/config/locales/de.yml index a480f55..9bfe10f 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -47,6 +47,6 @@ de: oauth_custom_scope: OAuth scope oauth_custom_scope_info: OAuth scope (default - 'openid profile email') oauth_custom_uid_field: UID field - oauth_custom_uid_field_info: UID field (default - sub) + oauth_custom_uid_field_info: UID field (default - preferred_username) oauth_custom_email_field: Email field oauth_custom_email_field_info: Email field (default - email) diff --git a/config/locales/en.yml b/config/locales/en.yml index 3b11e12..1a2ad91 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -47,6 +47,6 @@ en: oauth_custom_scope: OAuth scope oauth_custom_scope_info: OAuth scope (default - 'openid profile email') oauth_custom_uid_field: UID field - oauth_custom_uid_field_info: UID field (default - sub) + oauth_custom_uid_field_info: UID field (default - preferred_username) oauth_custom_email_field: Email field oauth_custom_email_field_info: Email field (default - email) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 9fff6dd..fc1bc74 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -47,6 +47,6 @@ fr: oauth_custom_scope: OAuth scope oauth_custom_scope_info: OAuth scope (default - 'openid profile email') oauth_custom_uid_field: UID field - oauth_custom_uid_field_info: UID field (default - sub) + oauth_custom_uid_field_info: UID field (default - preferred_username) oauth_custom_email_field: Email field oauth_custom_email_field_info: Email field (default - email) diff --git a/init.rb b/init.rb index ab520f7..869e9df 100644 --- a/init.rb +++ b/init.rb @@ -37,6 +37,13 @@ client_id: '', client_secret: '', tenant_id: '', + custom_name: '', + custom_auth_endpoint: '', + custom_token_endpoint: '', + custom_profile_endpoint: '', + custom_scope: 'openid profile email', + custom_uid_field: 'preferred_username', + custom_email_field: 'email', button_color: '#ffbe6f', button_icon: 'fas fa-address-card' }, partial: 'settings/oauth_settings'