anchor.diff:  handle_call({token, TokenId}, _From, #state{connection = C} = State) ->
       T0 = erlang:system_time(),
       Token = find_token(C, TokenId),
  -    lager:debug("[dalmatiner_dl_data:user_orgs] It took ~wms", [tdelta(T0)]),
  +    lager:debug("[dalmatiner_dl_data:token] It took ~wms", [tdelta(T0)]),
       {reply, {ok, Token}, State};
   handle_call({user_org_access, UserId, OrgId}, _From,
               #state{connection = C} = State) ->
       T0 = erlang:system_time(),
       Access = check_user_org_access(C, UserId, OrgId),
  -    lager:debug("[dalmatiner_dl_data:user_orgs] It took ~wms", [tdelta(T0)]),
  +    lager:debug("[dalmatiner_dl_data:user_org_access] It took ~wms", [tdelta(T0)]),
       {reply, {ok, Access}, State};
   handle_call({agent_access, Finger, OrgOids}, _From,
               #state{connection = C} = State) ->
       T0 = erlang:system_time(),
       Access = check_agent_access(C, Finger, OrgOids),
  -    lager:debug("[dalmatiner_dl_data:user_orgs] It took ~wms", [tdelta(T0)]),
  +    lager:debug("[dalmatiner_dl_data:agent_access] It took ~wms", [tdelta(T0)]),
       {reply, {ok, Access}, State};
   handle_call(_Request, _From, State) ->
       {reply, ok, State}.
  
positive.code:     mc_worker_api:find_one(C, <<"usertokens">>, {<<"_id">>, TokenOid}).
  
  check_user_org_access(C, UserId, OrgId) ->
      UserOid = {base16:decode(UserId)},
      OrgOid = {base16:decode(OrgId)},
      Org = mc_worker_api:find_one(C, <<"orgs">>, {<<"_id">>, OrgOid},
                                   #{projector => {<<"group">>, true}}),
      Gid = maps:get(<<"group">>, Org, undefined),
      Group = mc_worker_api:find_one(C, <<"groups">>,
                                     {<<"_id">>, Gid,
                                      <<"users.user">>, UserOid},
                                     #{projector => {<<"users">>, true}}),
      case Group of
          #{<<"_id">> := _} ->
              allow;
          _ ->
              deny
      end.
  
  check_agent_access(C, Finger, OrgOids) ->
  
negative.code:         _ ->
              deny
      end.
  
  find(C, Coll, Selector, Args) ->
      Cursor = mc_worker_api:find(C, Coll, Selector, Args),
      Docs = mc_cursor:foldl(fun (Doc, Acc) ->
                                     [Doc | Acc]
                             end, [], Cursor, infinity),
      mc_cursor:close(Cursor),
      Docs.
  
  pick(Key, List) ->
      [V || #{Key := V} <- List].
  
  includes(_K, _V, []) ->
      false;
  includes(K, V, [M | Rest]) ->
      case M of
          #{K := V} -> true;
          _ -> includes(K, V, Rest)
      end.
  