diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-25 21:08:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-25 21:08:56 +0300 |
commit | ff549ec680715e4ea1daf0cee457f29dfe3b6062 (patch) | |
tree | 823fc28718a1278025ee2d88c1368958befec4da /app/presenters/issue_presenter.rb | |
parent | ec558ad8ed732ff6f8a89aa3651eb92c27c50deb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/issue_presenter.rb')
-rw-r--r-- | app/presenters/issue_presenter.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/presenters/issue_presenter.rb b/app/presenters/issue_presenter.rb index 9b4e7e22165..69d775d8125 100644 --- a/app/presenters/issue_presenter.rb +++ b/app/presenters/issue_presenter.rb @@ -15,6 +15,19 @@ class IssuePresenter < Gitlab::View::Presenter::Delegated def project_emails_disabled? issue.project.emails_disabled? end + + delegator_override :service_desk_reply_to + def service_desk_reply_to + return unless super.present? + return super if Ability.allowed?(current_user, :read_external_emails, issue.project) + + Gitlab::Utils::Email.obfuscated_email(super, deform: true) + end + + delegator_override :issue_email_participants + def issue_email_participants + issue.issue_email_participants.present(current_user: current_user) + end end IssuePresenter.prepend_mod_with('IssuePresenter') |