Setup associations for inviting a group to a project with a custom role
What does this MR do and why?
This MR includes the following changes to lay the groundwork for allowing inviting a group to a project with a custom role (similar to Assign a custom role to an invited group).
- Add required database table column, foreign key constraint, and index.
- Setup association between
ProjectGroupLinkandMemberRole(custom role). - Update
MemberRoleRelationconcern to allow overriding the association (default isgroup) pointing to the resource belonging to the namespace that own theMemberRole
References
This MR implements part of Assign custom role when sharing a project to a ... (#468329).
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
# MemberRole
has_many :project_group_links
# ProjectGroupLink
belongs_to :member_role
erDiagram
MemberRole ||--o{ ProjectGroupLink: belongs_to
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Edited by Eugie Limpin