Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 36880 invoked from network); 24 Aug 2010 14:10:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Aug 2010 14:10:07 -0000 Received: (qmail 55974 invoked by uid 500); 24 Aug 2010 14:10:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 55415 invoked by uid 500); 24 Aug 2010 14:10:02 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 55400 invoked by uid 99); 24 Aug 2010 14:10:00 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Aug 2010 14:10:00 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of zachary.zolton@gmail.com designates 209.85.215.52 as permitted sender) Received: from [209.85.215.52] (HELO mail-ew0-f52.google.com) (209.85.215.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Aug 2010 14:09:37 +0000 Received: by ewy20 with SMTP id 20so4188636ewy.11 for ; Tue, 24 Aug 2010 07:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=HQbogB+W9crpMHnq8AYdwYpFNZn3DO85aOoRAbEVA9E=; b=syxD3n9FKz0mmD9ROxmYhCpLPiOJ/4gSMSDmOzdD0BecbPU/7JJ7OKSzhenA859fzt rhnZptfJnTX2IyHdGRB26JisqA6CpT9ard1qVOt87g5AC59EzruNGNMdNx0uLVbGPxTh rF2y9w7yY8IEF6A1wsy8bs4dsIXxVFNJPHMk4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=vt0CHa8ccv7kcibVVOwrC/NFaZUEX/3mnhFpKweyfvBH9eKuKGmZD0GarSUb/1KEhh 12lUxTG61/2V1IVxrwqPSmX1KWEiR/NfW6gTjGVyrHKNcvSapVoqkTem/a7+uxH1subS SuDtGFAap0JhqNNAedhq5XPm57zeuubtNFQ6U= Received: by 10.216.11.129 with SMTP id 1mr821741wex.90.1282658957130; Tue, 24 Aug 2010 07:09:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.168.71 with HTTP; Tue, 24 Aug 2010 07:08:57 -0700 (PDT) In-Reply-To: <8CD1171719EB943-16EC-97C0@webmail-m021.sysops.aol.com> References: <8CD1171719EB943-16EC-97C0@webmail-m021.sysops.aol.com> From: Zachary Zolton Date: Tue, 24 Aug 2010 09:08:57 -0500 Message-ID: Subject: Re: change _security for db To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Dan, 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 want. 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: http://wiki.apache.org/couchdb/Security_Features_Overview#Authorization Cheers, Zach 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. > > > = >