Add disabled reviewer support for MR assignees and reviewers
What does this MR do and why?
This MR implements the ability to disable reviewers based on the disabledReason field, similar to the work_item_assignees implementation in MR !215603. This prevents certain users (like agents out of credits) from being assigned as reviewers while allowing already-assigned reviewers to be removed.
Changes
- Update GraphQL query to include
compositeIdentityEnforcedfield for MR permissions - Add disabled user filtering in reviewer dropdown component
- Display
disabledReasoninstead of username for disabled reviewers - Prevent disabled users from being selected in dropdown
- Add visual styling for disabled reviewers with disabled text color
- Update specs with disabled and status fields in mock data
How to test
- Set up a user with
status.disabled = trueand adisabledReason - Open a merge request and try to add that user as a reviewer
- Verify the user appears with the disabled reason instead of their username
- Verify clicking on the disabled user doesn't add them as a reviewer
- If the user is already assigned, verify they can still be removed