diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/safe_url.rb | 4 | ||||
-rw-r--r-- | app/models/remote_mirror.rb | 2 | ||||
-rw-r--r-- | app/views/users/terms/index.html.haml | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/app/models/concerns/safe_url.rb b/app/models/concerns/safe_url.rb index febca7d241f..7dce05bddba 100644 --- a/app/models/concerns/safe_url.rb +++ b/app/models/concerns/safe_url.rb @@ -3,12 +3,12 @@ module SafeUrl extend ActiveSupport::Concern - def safe_url(usernames_whitelist: []) + def safe_url(allowed_usernames: []) return if url.nil? uri = URI.parse(url) uri.password = '*****' if uri.password - uri.user = '*****' if uri.user && !usernames_whitelist.include?(uri.user) + uri.user = '*****' if uri.user && allowed_usernames.exclude?(uri.user) uri.to_s rescue URI::Error end diff --git a/app/models/remote_mirror.rb b/app/models/remote_mirror.rb index 880970b72a8..1bde2727c44 100644 --- a/app/models/remote_mirror.rb +++ b/app/models/remote_mirror.rb @@ -207,7 +207,7 @@ class RemoteMirror < ApplicationRecord end def safe_url - super(usernames_whitelist: %w[git]) + super(allowed_usernames: %w[git]) end def bare_url diff --git a/app/views/users/terms/index.html.haml b/app/views/users/terms/index.html.haml index da8b73fd4fd..73d0f51f9ac 100644 --- a/app/views/users/terms/index.html.haml +++ b/app/views/users/terms/index.html.haml @@ -6,11 +6,11 @@ .card-footer.footer-block.clearfix - if can?(current_user, :accept_terms, @term) .float-right - = button_to accept_term_path(@term, redirect_params), class: 'gl-button btn btn-success gl-ml-3', data: { qa_selector: 'accept_terms_button' } do + = button_to accept_term_path(@term, redirect_params), class: 'gl-button btn btn-confirm gl-ml-3', data: { qa_selector: 'accept_terms_button' } do = _('Accept terms') - else .float-right - = link_to root_path, class: 'gl-button btn btn-success gl-ml-3' do + = link_to root_path, class: 'gl-button btn btn-confirm gl-ml-3' do = _('Continue') - if can?(current_user, :decline_terms, @term) .float-right |