anchor.diff:      Auth = proplists:get_value(auth, Admin),
       Credential = proplists:get_value(credential, Admin),
       Metadata = proplists:get_value(metadata, Admin, []),
  -    catch setup_root_user(Domain, #uce_user{name=Uid,
  +    setup_root_user(Domain, #uce_user{name=Uid,
                                         auth=Auth,
                                         credential=Credential,
                                         metadata=Metadata}).
  
positive.code:                                         conditions=Conditions}
                      end,
                      ConfigACL),
      case catch uce_role:add(Domain, #uce_role{id={Name, Domain}, acl=ACL}) of
          {ok, created} ->
              ok;
          {error, conflict} ->
              uce_role:update(Domain, #uce_role{id={Name, Domain}, acl=ACL}),
              ok;
          {error, Reason} ->
              throw({error, Reason})
      end.
  
  setup_root_role(Domain) ->
      case catch uce_role:add(Domain, #uce_role{id={"root", Domain},
                                                acl=[#uce_access{action="all", object="all"}]}) of
          {ok, created} ->
              ok;
          {error, conflict} ->
              ok;
          {error, Reason} ->
              throw({error, Reason})
      end.
  
  setup_root_user(Domain, #uce_user{} = User) ->
      {ok, UId} = uce_user:add(Domain, User),
      uce_user:addRole(Domain, {UId, Domain}, {"root", []}).
  
  setup_bricks(Domain) ->
      lists:foreach(fun({Name, Token}) ->
                            catch setup_root_user(Domain, #uce_user{name=Name,
                                                              auth="token",
                                                              credential=Token,
                                                              metadata=[]})
  
negative.code:          handle_cast/2,
           handle_info/2,
           terminate/2]).
  
  name(Domain) ->
      list_to_atom(lists:concat([?MODULE, "_", Domain])).
  