debian-mirror-gitlab/app/presenters/issue_email_participant_presenter.rb
2023-04-23 21:23:45 +05:30

12 lines
374 B
Ruby

# frozen_string_literal: true
class IssueEmailParticipantPresenter < Gitlab::View::Presenter::Delegated
presents ::IssueEmailParticipant, as: :participant
delegator_override :email
def email
return super if Ability.allowed?(current_user, :read_external_emails, participant.issue.project)
Gitlab::Utils::Email.obfuscated_email(super, deform: true)
end
end