summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-05-24 09:46:30 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-05-24 18:19:48 +0200
commit7a139c1602016485b8a2038dfc6121e47039c669 (patch)
treedc45dbcaf05157b8538ace1233270fccebbd73d3 /lib
parentc52db71e36ee70c4c5be80b029cf4362f28e3667 (diff)
downloadgitlab-ce-7a139c1602016485b8a2038dfc6121e47039c669.tar.gz
Add username to terms message in git and API callsbvl-add-username-to-terms-message
This will make it clearer to users which account is being used to make the API/git call. So they know which account needs to be used to accept the terms. Closes #46649
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/auth/user_access_denied_reason.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/auth/user_access_denied_reason.rb b/lib/gitlab/auth/user_access_denied_reason.rb
index af310aa12fc..1893cb001b2 100644
--- a/lib/gitlab/auth/user_access_denied_reason.rb
+++ b/lib/gitlab/auth/user_access_denied_reason.rb
@@ -8,12 +8,12 @@ module Gitlab
def rejection_message
case rejection_type
when :internal
- 'This action cannot be performed by internal users'
+ "This action cannot be performed by internal users"
when :terms_not_accepted
- 'You must accept the Terms of Service in order to perform this action. '\
- 'Please access GitLab from a web browser to accept these terms.'
+ "You (#{@user.to_reference}) must accept the Terms of Service in order to perform this action. "\
+ "Please access GitLab from a web browser to accept these terms."
else
- 'Your account has been blocked.'
+ "Your account has been blocked."
end
end