couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zachary Zolton <>
Subject Re: change _security for db
Date Tue, 24 Aug 2010 14:08:57 GMT

For each database there is a security object; t's not a document, nor
does it replicate like one.

The easiest way to change this object is to just open Futon, click on
your database and then click the "Security..." button near the top.
Note that the textboxes should contain JSON arrays of the names you

If you need to add to security object programmatically then it goes
something like this:

security = http_get_json 'http://admin:pass@your.couch/dbname/_security'
# e.g. you wanna add user 'foobar' onto array of reader names:
security.readers.names.push 'foobar'
http_put_json 'http://admin:pass@your.couch/dbname/_security', security

For more information, see:



On Tue, Aug 24, 2010 at 2:02 AM,  <> wrote:
> How do you change the _security feature of the database.
> Is _security considered a doc or a db?
> How would you say add a name to the names list
> like
> {"admins":{"names":["joe2"],"roles":[]},"readers":{"names":["joe2"],"roles":[]}}
> what couchjs feature would allow you to add a name to a list
> Dan
> Trying to get html to talk to couch through couchjs.
> =

View raw message