Commit a0746693 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch...

Merge branch '212213-eurie-remove-check-for-gitlab-employee-badge-in-spam-allowlisting' into 'master'

Remove check for gitlab employee badge feature

See merge request gitlab-org/gitlab!64343
parents afee21b1 73ce5687
...@@ -47,7 +47,7 @@ module EE ...@@ -47,7 +47,7 @@ module EE
end end
def gitlab_team_member_badge(author, css_class: nil) 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' default_css_class = 'd-inline-block align-middle'
gitlab_team_member = _('GitLab Team Member') gitlab_team_member = _('GitLab Team Member')
......
...@@ -339,7 +339,7 @@ module EE ...@@ -339,7 +339,7 @@ module EE
def gitlab_employee? def gitlab_employee?
strong_memoize(:gitlab_employee) do strong_memoize(:gitlab_employee) do
::Gitlab.com? && ::Feature.enabled?(:gitlab_employee_badge) && gitlab_team_member? ::Gitlab.com? && gitlab_team_member?
end end
end end
......
...@@ -131,7 +131,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated ...@@ -131,7 +131,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
url: user_path(epic.author), url: user_path(epic.author),
username: "@#{epic.author.username}", username: "@#{epic.author.username}",
src: author_icon, src: author_icon,
is_gitlab_employee: epic.author.gitlab_employee? is_gitlab_employee: epic.author.gitlab_employee? && ::Feature.enabled?(:gitlab_employee_badge)
} }
end end
......
...@@ -5,7 +5,7 @@ module EE ...@@ -5,7 +5,7 @@ module EE
extend ActiveSupport::Concern extend ActiveSupport::Concern
prepended do 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 end
end end
...@@ -1467,18 +1467,6 @@ RSpec.describe User do ...@@ -1467,18 +1467,6 @@ RSpec.describe User do
it { is_expected.to be false } it { is_expected.to be false }
end end
end end
context 'when `:gitlab_employee_badge` feature flag is disabled' do
let(:user) { create(:user) }
before do
allow(Gitlab).to receive(:com?).and_return(true)
stub_feature_flags(gitlab_employee_badge: false)
gitlab_group.add_user(user, Gitlab::Access::DEVELOPER)
end
it { is_expected.to be false }
end
end end
describe '#gitlab_bot?' do describe '#gitlab_bot?' do
......
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