Repository: couchdb-cassim
Updated Branches:
  refs/heads/master 54be300f8 -> 65d100dd7


Use ADMIN_CTX and ADMIN_USER macros from couch_db.hrl


Project: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/commit/65d100dd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/tree/65d100dd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-cassim/diff/65d100dd

Branch: refs/heads/master
Commit: 65d100dd7022ab38fa1439200d1a5c254c722e36
Parents: 54be300
Author: Alexander Shorin <[email protected]>
Authored: Mon Jan 26 07:05:00 2015 +0300
Committer: Alexander Shorin <[email protected]>
Committed: Mon Jan 26 07:05:00 2015 +0300

----------------------------------------------------------------------
 src/cassim_metadata_cache.erl | 3 +--
 src/cassim_security.erl       | 4 ----
 2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/65d100dd/src/cassim_metadata_cache.erl
----------------------------------------------------------------------
diff --git a/src/cassim_metadata_cache.erl b/src/cassim_metadata_cache.erl
index 8bd15fb..7a3a28d 100644
--- a/src/cassim_metadata_cache.erl
+++ b/src/cassim_metadata_cache.erl
@@ -260,6 +260,5 @@ cleanup_old_docs_callback({error, Reason}, {MetaId, Acc}) ->
 
 delete_meta_docs(Docs0) ->
     Docs = [D#doc{deleted=true, body={[]}} || D <- Docs0],
-    Options = [{user_ctx, #user_ctx{roles=[<<"_admin">>]}}],
     DbName = metadata_db(),
-    fabric:update_docs(DbName, Docs, Options).
+    fabric:update_docs(DbName, Docs, [?ADMIN_CTX]).

http://git-wip-us.apache.org/repos/asf/couchdb-cassim/blob/65d100dd/src/cassim_security.erl
----------------------------------------------------------------------
diff --git a/src/cassim_security.erl b/src/cassim_security.erl
index c427758..fea7cb6 100644
--- a/src/cassim_security.erl
+++ b/src/cassim_security.erl
@@ -33,10 +33,6 @@
 -include_lib("couch/include/couch_db.hrl").
 
 
--define(ADMIN_USER, #user_ctx{roles = [<<"_admin">>]}).
--define(ADMIN_CTX, {user_ctx, ?ADMIN_USER}).
-
-
 get_security(DbName) ->
     get_security(DbName, [?ADMIN_CTX]).
 

Reply via email to