Manual:$wgAddGroups

Details
If a group can add any right (example: bureaucrats can add any right):
 * $wgAddGroups['bureaucrat'] = true;

If a group add only some rights (example: bureaucrats can add only sysop and bot groups):
 * $wgAddGroups['bureaucrat'] = array( 'sysop', 'bot' );

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.