Commit d55a23a2 authored by Dmitry Gruzd's avatar Dmitry Gruzd

Merge branch 'jgay-access-denied-fix' into 'master'

Add URL to rejection_message if terms_not_accepted

See merge request gitlab-org/gitlab!75082
parents 65e0c9dc 33839690
...@@ -15,7 +15,7 @@ module Gitlab ...@@ -15,7 +15,7 @@ module Gitlab
"Your account is pending approval from your administrator and hence blocked." "Your account is pending approval from your administrator and hence blocked."
when :terms_not_accepted when :terms_not_accepted
"You (#{@user.to_reference}) must accept the Terms of Service in order to perform this action. "\ "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." "To accept these terms, please access GitLab from a web browser at #{Gitlab.config.gitlab.url}."
when :deactivated when :deactivated
"Your account has been deactivated by your administrator. "\ "Your account has been deactivated by your administrator. "\
"Please log back in from a web browser to reactivate your account at #{Gitlab.config.gitlab.url}" "Please log back in from a web browser to reactivate your account at #{Gitlab.config.gitlab.url}"
......
...@@ -26,6 +26,7 @@ RSpec.describe Gitlab::Auth::UserAccessDeniedReason do ...@@ -26,6 +26,7 @@ RSpec.describe Gitlab::Auth::UserAccessDeniedReason do
it { is_expected.to match /must accept the Terms of Service/ } it { is_expected.to match /must accept the Terms of Service/ }
it { is_expected.to include(user.username) } it { is_expected.to include(user.username) }
it { is_expected.to include(Gitlab.config.gitlab.url) }
end end
context 'when the user is internal' do context 'when the user is internal' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment