anchor.diff:           make_context/2,
            is_authorized_on_resource/6,
            ping/0,
  -         remove_actor_from_actor_acl/2
  +         remove_actor_from_actor_acl/2,
  +         remove_ace_for_entity/6,
  +         add_ace_for_entity/6
           ]).
   
   -ifdef(TEST).
  
positive.code:                          access_method(),
                           authz_ace()) -> ok |
                                           {error, any()}.
  set_ace_for_entity(RequestorId, AuthzType, Id, AccessMethod, #authz_ace{actors=Actors, groups=Groups}) ->
      Url = make_url([pluralize_resource(AuthzType), Id, acl, AccessMethod]),
      %% jiffy:encode can return an iolist which breaks the http code. This has only been
      %% observed with floats, but may occur elsewhere.
  
negative.code:             {error, container_acl}
      end.
  
  %% @doc Set the ACL of the entity to the given ACL, one ACE at a time.
  %%
  %% Returns 'ok' if all ACEs are successfully set, and {error, Reason} at the first failure.
  %%
  %% No, this is not transactional in any sense, but then again, neither is CouchDB.  In any
  %% case, this will change dramatically once we move to SQL.
  -spec set_acl(requestor_id(),
                AuthzType :: 'actor' | 'object' | 'container' | 'group',
                ObjectId :: object_id(),
                NewAcl :: authz_acl()) -> ok | {error, any()}.
  set_acl(_RequestorId, _AuthzType, _ObjectId, []) ->
  