anchor.diff:      end.
   
   add_group_to_group({error, no_user_group} = Error, _GAGroup) ->
  +    Error;
  +add_group_to_group(_UserGroup, {error, no_global_admins_group} = Error) ->
       Error;
   add_group_to_group(#group{authz_id = IdToAdd}, #group{authz_id = TargetId}) ->
       mv_oc_chef_authz:add_to_group(TargetId, group, IdToAdd, superuser).
  
positive.code:     case add_group_to_group(UserGroup, GAGroup) of
          ok ->
              ok;
          {error, no_user_group} ->
              lager:info("Organization ~p has no user group and cannot be migrated.", [OrgName]),
              ok;
          {error, Error} ->
              lager:error("Organization ~p failed during group addition.", [OrgName]),
  
negative.code:     Orgs.
  
  global_admin_group(Org) ->
      case sqerl:select(global_admin_query(), [ga_groupname(Org)], rows_as_records, [group, record_info(fields, group)]) of
          {ok, [Group]} ->
              Group;
          {ok, none} ->
              {error, no_global_admins_group}
      end.
  
  ga_groupname(#org{name = OrgName}) ->
      iolist_to_binary([OrgName, <<"_global_admins">>]).
  