Skip to content

Refactor to using Vuex modules for project/group members views

📖 What does this MR do?

Related to #324680 (closed) and part of &5616

Currently the group/project member pages are composed of 4 separate Vue applications that use Bootstrap tabs. We would like to move these into one Vue app so we can use GlTabs and move towards deprecating Bootstrap tabs. As a step towards doing this we need to refactor the Vuex store to use modules. Right now the Vuex store is not using modules which will not work when we convert to one Vue application because the naming of state/actions/mutations would clash.

This technique provides a namespace variable to all components that can be used to determine with Vuex module to use. There isn't a super clean way to use dynamic namespaces in Vuex. The workaround its to use this technique which we have used a few other places in the codebase:

Why so many changes?

Due to the way Vuex modules work this was the smallest iteration I could come up with. Once you add namespaced: true Vuex expects all state, actions, and mutations to be namespaced so there isn't a way to change only some of the state/actions/mutations. Open to suggestions on how to split this up into multiple MRs 🙂

Next steps

See Implementation plan section in #324681 (closed)

💻 Local testing

  1. Create a group or project and navigate to Group or Project -> Members

How to add a group to the Groups tab

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

How to add an invited member to the Invited tab

  1. Navigate to Group or Project -> 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 the Access requests tab

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

LDAP

See GDK LDAP guide

📹 Videos

No changes, still works 🙂

View
Group Screen_Recording_2021-04-08_at_12.39.40_PM_480p
Project Screen_Recording_2021-04-08_at_12.41.13_PM480p
LDAP group Screen_Recording_2021-04-08_at_12.42.59_PM720p

🚦 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