Hide "Update role" button in member drawer when access is inherited
Summary
The "Update role" button on the project/group members page drawer should not be visible when the member's access is inherited from a parent group. Currently, clicking this button results in a 404 error because the backend cannot update inherited membership at the child level.
Problem
When viewing a member whose access is inherited (not directly assigned to the current project/group):
- The "Update role" button is displayed in the member drawer
- Clicking the button and attempting to submit triggers a 404 error
- This creates a confusing user experience
Expected Behavior
The "Update role" button should be hidden when:
- The member's access is inherited from a parent group
- The membership cannot be modified at the current project/group level
Instead, the UI should either:
- Hide the button entirely for inherited members
- Or display a message indicating the role must be changed at the parent group level (with a link if appropriate)
Steps to Reproduce
- Navigate to a project or subgroup that has members with inherited access
- Open the members page
- Click on a member whose access is inherited from a parent group
- Observe the "Update role" button is visible in the drawer
- Click "Update role" and attempt to submit
- Observe the 404 error
Acceptance Criteria
- "Update role" button is not visible for members with inherited access
- Consider showing informational text explaining why the role cannot be changed here
- Ensure the fix applies to both project and group members pages
Edited by 🤖 GitLab Bot 🤖