Change `memberType` that refers to the model to `memberModelType`
What does this MR do and why?
In the app/assets/javascripts/members
there are two different types of references to memberType
which gets confusing.
The first memberType
(the one we are keeping for now) is responsible for splitting up the members into different tabs and can have 4 values: user
, group
, invite
, and accessRequest
. This naming doesn't 100% make sense but will be a very big effort to change so we are leaving it for now.
The tabs
The second memberType
refers to the model type of the member. A member can either be a app/models/members/group_member.rb or a app/models/members/project_member.rb. On the frontend these are referred to as GroupMember
or ProjectMember
. This distinction is used in app/assets/javascripts/members/components/modals/remove_member_modal.vue#L113 to determine if the Also remove direct user membership from subgroups and projects
checkbox should be shown.
To avoid confusion we are changing the second memberType
reference to memberModelType
. This MR also moves GroupMember
or ProjectMember
into constants.
Screenshots or screen recordings
No visual changes.
How to set up and validate locally
- Navigate to a group ->
Group information
->Members
. - From the dropdown next to a member choose
Remove member
- Verify that the
Also remove direct user membership from subgroups and projects
checkbox is there.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.