Refactor badaccess-groupX and friends to use User::getGroupsWithPermission().