debian-mirror-gitlab/app/presenters/issue_email_participant_presenter.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
374 B
Ruby
Raw Normal View History

2023-04-23 21:23:45 +05:30
# 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