diff options
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') |