Skip to content

Only show group member roles if explicitly requested

This very simply fixes an EE problem, but I made the change here so it's less prone to errors from merges.

In EE, prior to this change, group member roles were shown in project member list when a project is shared with a group. This is bad because the project explicitly shares with the group and sets a 'max access' level. If the max access level is 'developer' the project owner doesn't want to see 'Owner' in the group roles because it will confuse them. I verified that permissions are really being honored here, it was just an error in the view. You can see in https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/views/projects/project_members/_shared_group_members.html.haml#L18 where this was how it was intended to be. Likely a CE-EE merge introduced this bug. That's why I made the boolean required in CE even though this is for EE.

Before

Screen_Shot_2016-03-01_at_8.59.02_AM

After

Screen_Shot_2016-03-01_at_9.17.54_AM

Merge request reports