Skip to content

Refactor helper method to serializer [RUN AS-IF-FOSS]

What does this MR do?

In preparation for #281809 (closed) and as a follow-up to !40548 (merged) this MR refactors a helper method to use a serializer. This will allow us to use member_serializer for group members and project members and is also a cleaner implementation.

Note about frontend changes

All frontend changes are to change references of source.name to source.fullName. Originally the backend exposed the the source's (parent group) full_name property as name. But it didn't really make sense to alias full_name as name because we might need the actual name property in the future. This MR removes that alias from the backend and changes the frontend to match.

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 an invited 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 project

  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 project name

Screenshots (strongly suggested)

No visual changes. Screenshots below for context:

Before After
Screen_Shot_2021-01-11_at_11.30.25_AM Screen_Shot_2021-01-11_at_10.56.16_AM
Screen_Shot_2021-01-11_at_11.29.08_AM Screen_Shot_2021-01-11_at_10.58.27_AM
Screen_Shot_2021-01-11_at_11.29.21_AM Screen_Shot_2021-01-11_at_10.59.05_AM
Screen_Shot_2021-01-11_at_11.29.34_AM Screen_Shot_2021-01-11_at_10.59.45_AM
Screen_Shot_2021-01-11_at_11.29.46_AM Screen_Shot_2021-01-11_at_11.00.34_AM

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