Commit 614d3fbf authored by Phil Hughes's avatar Phil Hughes

Merge branch 'new-group-member-scb' into 'master'

Resolve CE/EE diffs in new group member view

Closes #11026

See merge request gitlab-org/gitlab-ee!12850
parents 645ef536 a555c674
# frozen_string_literal: true
module Groups::GroupMembersHelper
def group_member_select_options
{ multiple: true, class: 'input-clamp', scope: :all, email_user: true }
end
end
Groups::GroupMembersHelper.prepend(EE::Groups::GroupMembersHelper)
= form_for @group_member, url: group_group_members_path(@group), html: { class: 'users-project-form users-group-form' } do |f|
.row
.col-md-4.col-lg-6
= users_select_tag(:user_ids, multiple: true, class: 'input-clamp', scope: :all, email_user: true, skip_ldap: @group.ldap_synced?)
= users_select_tag(:user_ids, group_member_select_options)
.form-text.text-muted.append-bottom-10
Search for members by name, username, or email, or invite new ones using their email address.
......
# frozen_string_literal: true
module EE::Groups::GroupMembersHelper
extend ::Gitlab::Utils::Override
override :group_member_select_options
def group_member_select_options
super.merge(skip_ldap: @group.ldap_synced?)
end
end
# frozen_string_literal: true
require "spec_helper"
describe Groups::GroupMembersHelper do
describe '.group_member_select_options' do
let(:group) { create(:group) }
before do
helper.instance_variable_set(:@group, group)
end
it 'returns an options hash with skip_ldap' do
expect(helper.group_member_select_options).to include(skip_ldap: false)
end
end
end
# frozen_string_literal: true
require "spec_helper"
describe Groups::GroupMembersHelper do
describe '.group_member_select_options' do
let(:group) { create(:group) }
before do
helper.instance_variable_set(:@group, group)
end
it 'returns an options hash' do
expect(helper.group_member_select_options).to include(multiple: true, scope: :all, email_user: true)
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