diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/helpers/emails_helper.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/helpers/emails_helper.rb')
-rw-r--r-- | app/helpers/emails_helper.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/helpers/emails_helper.rb b/app/helpers/emails_helper.rb index 0a0dc77e5e2..017981c8c8e 100644 --- a/app/helpers/emails_helper.rb +++ b/app/helpers/emails_helper.rb @@ -214,6 +214,24 @@ module EmailsHelper end end + def instance_access_request_text(user, format: nil) + gitlab_host = Gitlab.config.gitlab.host + + _('%{username} has asked for a GitLab account on your instance %{host}:') % { username: sanitize_name(user.name), host: gitlab_host } + end + + def instance_access_request_link(user, format: nil) + url = admin_user_url(user) + + case format + when :html + user_page = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: url } + _("Click %{link_start}here%{link_end} to view the request.").html_safe % { link_start: user_page, link_end: '</a>'.html_safe } + else + _('Click %{link_to} to view the request.') % { link_to: url } + end + end + def contact_your_administrator_text _('Please contact your administrator with any questions.') end |