Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code tidying up #27

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If custom_uid_field is initialized to 'preferred_username', shouldn't be set oauth_custom_uid_field_info: UID field (default - preferred_username) in language files then?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

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
Loading