Commit 73ce5687 authored by Ethan Urie's avatar Ethan Urie

Add `Feature.enabled?` check

parent 80cc465d
......@@ -47,7 +47,7 @@ module EE
end
def gitlab_team_member_badge(author, css_class: nil)
return unless author.gitlab_employee?
return unless author.gitlab_employee? && ::Feature.enabled?(:gitlab_employee_badge)
default_css_class = 'd-inline-block align-middle'
gitlab_team_member = _('GitLab Team Member')
......
......@@ -131,7 +131,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
url: user_path(epic.author),
username: "@#{epic.author.username}",
src: author_icon,
is_gitlab_employee: epic.author.gitlab_employee?
is_gitlab_employee: epic.author.gitlab_employee? && ::Feature.enabled?(:gitlab_employee_badge)
}
end
......
......@@ -5,7 +5,7 @@ module EE
extend ActiveSupport::Concern
prepended do
expose :gitlab_employee?, as: :is_gitlab_employee, if: ->(user, options) { user.gitlab_employee? }
expose :gitlab_employee?, as: :is_gitlab_employee, if: ->(user, options) { user.gitlab_employee? && ::Feature.enabled?(:gitlab_employee_badge) }
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment