anchor.diff:  
   
   users() ->
  -    % NOTE '$deleted' is copied here since the other is a constant on
  -    % riak_core_security ?TOMBSTONE
  -    riak_core_metadata:fold(fun({_Username, ['$deleted']}, Acc) ->
  +    riak_core_metadata:fold(fun({_Username, [?TOMBSTONE]}, Acc) ->
                                       Acc;
                                  ({Username, Options}, Acc) ->
                                       [{Username, Options}|Acc]
  
positive.code: -module(iorio_user).
  -export([create/2, users/0, user_grants/0, grants_for/2]).
  
  create(Username, Password) when is_binary(Username) ->
      create(binary_to_list(Username), Password);
  
negative.code:                             end, [], {<<"security">>, <<"usergrants">>}).
  
  grants_for(QBucket, any) ->
      riak_core_metadata:fold(fun({_, [?TOMBSTONE]}, Acc) -> Acc;
                                  ({{Username, Bucket}, [Perms]}, Acc) when QBucket =:= Bucket ->
                                      [{Username, Bucket, any, Perms}|Acc];
                                 (_, Acc) -> Acc
                              end, [], {<<"security">>, <<"usergrants">>});
  grants_for(QBucket, QStream) ->
      riak_core_metadata:fold(fun({_, [?TOMBSTONE]}, Acc) -> Acc;
                                 ({{Username, {Bucket, Stream}}, [Perms]}, Acc) 
                                   when QBucket =:= Bucket andalso QStream =:= Stream ->
                                      [{Username, Bucket, Stream, Perms}|Acc];
                                 (_, Acc) -> Acc
                              end, [], {<<"security">>, <<"usergrants">>}).
  