Skip to content

Reorganize group member management into tabs

What does this MR do?

Improves UX by reorganizing the group members management page into tabs. It moves "Members", "Groups", "Pending", and "Access requests" into tabs.

Screenshots

Page Before After
Members Screen_Shot_2020-08-09_at_10.05.17_AM Screen_Shot_2020-08-09_at_9.50.56_AM
Members - mobile Screen_Shot_2020-08-09_at_10.07.04_AM Screen_Shot_2020-08-09_at_9.53.41_AM
Linked groups N/A Screen_Shot_2020-08-09_at_9.51.17_AM
Linked groups - mobile N/A Screen_Shot_2020-08-09_at_9.55.50_AM
Invited Screen_Shot_2020-08-09_at_10.05.45_AM Screen_Shot_2020-08-09_at_9.51.38_AM
Invited - mobile Screen_Shot_2020-08-09_at_10.07.35_AM Screen_Shot_2020-08-09_at_9.56.27_AM
Access requests N/A Screen_Shot_2020-08-09_at_9.52.02_AM
Access requests - mobile N/A Screen_Shot_2020-08-09_at_9.56.58_AM

Local testing

  1. Create a group
  2. Navigate to Group -> Members

How to add a group

  1. Navigate to Group -> Members
  2. Click the Invite group tab

How to add a pending member

  1. Navigate to Group -> Members
  2. In the GitLab member or Email address enter an email that a user does not already own
  3. Click Invite "example@test.com" by email

How to request access to a group

  1. Log in (or impersonate) a user that doesn't already have access to the group
  2. Navigate to the group overview
  3. Click Request access located below the group name

Seeding

Instead of manually adding users with the above methods you can also seed the database with these rake tasks.

Note: you need to check Disable email notifications in Group -> Settings -> General -> Permissions, LFS, 2FA

ee/lib/tasks/gitlab/seed_group_members.rake

namespace :gitlab do
  # Your group ID
  GROUP_ID = 178

  task :seed_group_members => :gitlab_environment do
    group = ::Group.find(GROUP_ID)
    51.times do
      user = FactoryBot.create(:user, email: FFaker::Internet.email, name: FFaker::Name.name, username: FFaker::Internet.user_name)
      group.add_guest(user)
    end
  end

  task :seed_invited_group_members => :gitlab_environment do
    group = ::Group.find(GROUP_ID)
    51.times do
      FactoryBot.create(:group_member, group: group, user_id: nil, invite_token: 'xxx', invite_email: FFaker::Internet.email)
    end
  end

  task :seed_group_access_requests => :gitlab_environment do
    group = ::Group.find(GROUP_ID)
    5.times do
      user = FactoryBot.create(:user, email: FFaker::Internet.email, name: FFaker::Name.name, username: FFaker::Internet.user_name)
      FactoryBot.create(:group_member, :access_request, group: group, user: user)
    end
  end
end

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Hegman

Merge request reports

Loading