Hide Update role button in drawer for inherited members

What does this MR do and why?

The "Update role" button in the member role details drawer could be shown for members with inherited access, even though their role can't be changed at that level. The role selector already correctly hides itself for inherited members (permissions.canUpdate), but the footer that renders the "Update role" / "Cancel" buttons only checked whether the role had changed, not whether the user was actually allowed to update it. If those got out of sync, the save button could appear for a member whose role can't be saved, and clicking it would fail with a 404.

This MR adds the same permissions.canUpdate check to the footer's v-if, so the save/cancel controls only render when the member can actually be updated.

Screenshots or screen recordings

Not applicable — this only affects a corner case where the footer's guard condition could get out of sync with the role selector's guard condition. No visual layout change for the normal (working) flow.

How to set up and validate locally

  1. Open a project or group's Members page.
  2. Click a member who has inherited access (their role can't be changed from this page) to open the role details drawer.
  3. Confirm the role is shown as text (not a dropdown) and no "Update role" button appears in the footer.
  4. Run the updated spec:
    yarn jest spec/frontend/members/components/table/drawer/role_details_drawer_spec.js

References

#612039 (closed)

Merge request reports

Loading
Loading