Background
RestrictedUserGroupChecker was introduced in T407886: Create a service for validating whether a user can be added to a restricted group, along with the RestrictedGroupsconfig, but neither are used yet.
UserGroupAssignmentService should be updated to check this service when checking which groups a performer can change for a given target.
This will allow groups to be configured using the RestrictedGroups config.
Technical details
UserGroupAssignmentService::computeChangeableGroups should check via RestrictedUserGroupChecker whether a particular performer may add or remove a group, before deciding whether or not it is changeable.
Eventually this will replace running the SpecialUserRightsChangeableGroups hook, but that will be done in a separate task.
Note that the hook provides a message with each restricted group, to explain why a group cannot be added. It should also be possible to display a message if the group is determined by RestrictedUserGroupChecker to be restricted.
Acceptance criteria
- It would be possible to re-configure a restricted group via $wgRestrictedGroups instead of SpecialUserRightsChangeableGroupsHook, and have it behave the same as if it were configured via the hook
(Don't actually reconfigure the group in this task.)


