Skip to content

Commit

Permalink
Merge pull request #27 from vladimirdulov/custom-oidc-provider
Browse files Browse the repository at this point in the history
code tidying up
  • Loading branch information
picman authored Mar 5, 2024
2 parents e7a55de + d847935 commit 39e67d4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/hooks/_view_account_login_bottom.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
<i id="button_icon" class="<%= Setting.plugin_redmine_oauth[:button_icon] %>"></i>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion config/locales/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
7 changes: 7 additions & 0 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 39e67d4

Please sign in to comment.