summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Trainer <klaus_trainer@apache.org>2015-08-10 22:22:52 +0200
committerKlaus Trainer <klaus_trainer@apache.org>2015-08-26 13:30:28 +0200
commitd56f2fc4f268c9e750741fa49bf5640cdf09fbdb (patch)
tree016711e620385b08ee0422767e496b67eb4ff2cf
parentcbff75a519dec72cb643728045652900d4bf5e9c (diff)
downloadcouchdb-d56f2fc4f268c9e750741fa49bf5640cdf09fbdb.tar.gz
Add couch_peruser
-rw-r--r--rebar.config.script1
-rw-r--r--rel/overlay/etc/default.ini11
-rw-r--r--rel/overlay/etc/local.ini10
-rw-r--r--rel/reltool.config2
4 files changed, 24 insertions, 0 deletions
diff --git a/rebar.config.script b/rebar.config.script
index 6b09c3666..38b2d2e29 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -30,6 +30,7 @@ DepDescs = [
{couch_plugins, "couch-plugins", {branch, "master"}},
{couch_event, "couch-event", {branch, "master"}},
{couch_stats, "couch-stats", {branch, "master"}},
+ {couch_peruser, "peruser", {branch, "master"}},
{docs, "documentation", {branch, "master"}, [raw]},
{ddoc_cache, "ddoc-cache", {branch, "master"}},
{ets_lru, "ets-lru", {branch, "master"}},
diff --git a/rel/overlay/etc/default.ini b/rel/overlay/etc/default.ini
index 7878981cb..8cda263a1 100644
--- a/rel/overlay/etc/default.ini
+++ b/rel/overlay/etc/default.ini
@@ -45,6 +45,16 @@ checkpoint_after = 5242880 ; checkpoint after every N bytes were written
; larger buffer sizes can originate smaller files
keyvalue_buffer_size = 2097152 ; value in bytes
+[couch_peruser]
+; If enabled, couch_peruser ensures that a private per-user database
+; exists for each document in _users. These databases are writable only
+; by the corresponding user. Databases are in the following form:
+; userdb-{hex encoded username}
+enable = false
+; If set to true and a user is deleted, the respective database gets
+; deleted as well.
+delete_dbs = false
+
[httpd]
port = {{backend_port}}
bind_address = 127.0.0.1
@@ -157,6 +167,7 @@ uuids={couch_uuids, start, []}
auth_cache={couch_auth_cache, start_link, []}
os_daemons={couch_os_daemons, start_link, []}
compaction_daemon={couch_compaction_daemon, start_link, []}
+couch_peruser={couch_peruser, start_link, []}
[indexers]
couch_mrview = true
diff --git a/rel/overlay/etc/local.ini b/rel/overlay/etc/local.ini
index 5877eb402..58baefd5d 100644
--- a/rel/overlay/etc/local.ini
+++ b/rel/overlay/etc/local.ini
@@ -7,6 +7,16 @@
[couchdb]
;max_document_size = 4294967296 ; bytes
+[couch_peruser]
+; If enabled, couch_peruser ensures that a private per-user database
+; exists for each document in _users. These databases are writable only
+; by the corresponding user. Databases are in the following form:
+; userdb-{hex encoded username}
+;enable = true
+; If set to true and a user is deleted, the respective database gets
+; deleted as well.
+;delete_dbs = true
+
[httpd]
;port = 5984
;bind_address = 127.0.0.1
diff --git a/rel/reltool.config b/rel/reltool.config
index a52d03730..7699f3eb8 100644
--- a/rel/reltool.config
+++ b/rel/reltool.config
@@ -41,6 +41,7 @@
couch_replicator,
couch_stats,
couch_event,
+ couch_peruser,
ddoc_cache,
ets_lru,
fabric,
@@ -97,6 +98,7 @@
{app, couch_replicator, [{incl_cond, include}]},
{app, couch_stats, [{incl_cond, include}]},
{app, couch_event, [{incl_cond, include}]},
+ {app, couch_peruser, [{incl_cond, include}]},
{app, ddoc_cache, [{incl_cond, include}]},
{app, ets_lru, [{incl_cond, include}]},
{app, fabric, [{incl_cond, include}]},