Commit 71636fca authored by Max Woolf's avatar Max Woolf

Merge branch '326714-fix-minor-admin-users-vue-issues' into 'master'

Fix badge variants in admin/users table

See merge request gitlab-org/gitlab!60592
parents cc7fed7d ba8cfc95
......@@ -100,7 +100,7 @@ module UsersHelper
badges << blocked_user_badge(user) if user.blocked?
badges << { text: s_('AdminUsers|Admin'), variant: 'success' } if user.admin?
badges << { text: s_('AdminUsers|External'), variant: 'secondary' } if user.external?
badges << { text: s_("AdminUsers|It's you!"), variant: nil } if current_user == user
badges << { text: s_("AdminUsers|It's you!"), variant: 'muted' } if current_user == user
end
end
......
......@@ -15,7 +15,7 @@ module EE
if !::Gitlab.com? && user.using_license_seat?
it_s_you_index = badges.index { |badge| badge[:text] == "It's you!" } || -1
badges.insert(it_s_you_index, { text: s_('AdminUsers|Is using seat'), variant: 'light' })
badges.insert(it_s_you_index, { text: s_('AdminUsers|Is using seat'), variant: 'neutral' })
end
end
end
......
---
title: Fix badge variants in admin/users table
merge_request: 60592
author:
type: fixed
......@@ -58,7 +58,7 @@ RSpec.describe UsersHelper do
expect(subject).to eq(
[
{ text: 'Admin', variant: 'success' },
{ text: "It's you!", variant: nil }
{ text: "It's you!", variant: 'muted' }
]
)
end
......@@ -85,14 +85,14 @@ RSpec.describe UsersHelper do
expect(subject).to eq(
[
{ text: 'Admin', variant: 'success' },
{ text: 'Is using seat', variant: 'light' },
{ text: "It's you!", variant: nil }
{ text: 'Is using seat', variant: 'neutral' },
{ text: "It's you!", variant: 'muted' }
]
)
end
end
it { expect(subject).to eq([text: 'Is using seat', variant: 'light']) }
it { expect(subject).to eq([text: 'Is using seat', variant: 'neutral']) }
end
context 'when user does not use a license seat' do
......
......@@ -160,7 +160,7 @@ RSpec.describe UsersHelper do
it 'returns the "It\'s You" badge' do
badges = helper.user_badges_in_admin_section(user)
expect(filter_ee_badges(badges)).to eq([text: "It's you!", variant: nil])
expect(filter_ee_badges(badges)).to eq([text: "It's you!", variant: "muted"])
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