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):

  1. The "Update role" button is displayed in the member drawer
  2. Clicking the button and attempting to submit triggers a 404 error
  3. 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

  1. Navigate to a project or subgroup that has members with inherited access
  2. Open the members page
  3. Click on a member whose access is inherited from a parent group
  4. Observe the "Update role" button is visible in the drawer
  5. Click "Update role" and attempt to submit
  6. 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 🤖