Manual:$wgAddGroups

Details
If a group can add any right (example: bureaucrats can add any right): If a group add only some rights (example: bureaucrats can add only sysop and bot groups):

User must have access to Special:Userrights. If $wgAddGroups and $wgRemoveGroups aren't set for a specific group, then this group can add and remove any group.