Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE011C329 for ; Mon, 3 Jun 2013 14:27:32 +0000 (UTC) Received: (qmail 40657 invoked by uid 500); 3 Jun 2013 14:27:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 40547 invoked by uid 500); 3 Jun 2013 14:27:31 -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 40537 invoked by uid 99); 3 Jun 2013 14:27:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2013 14:27:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kxepal@gmail.com designates 209.85.212.178 as permitted sender) Received: from [209.85.212.178] (HELO mail-wi0-f178.google.com) (209.85.212.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jun 2013 14:27:26 +0000 Received: by mail-wi0-f178.google.com with SMTP id hj6so2721236wib.11 for ; Mon, 03 Jun 2013 07:27:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=8X1iQC8vgowufCAbGp8od86fzroHTlHB+57NBmEf31c=; b=cYct/tWV1YI8Aedrqww8ThJ3EUpUt2Tc0QVmatzEXmi+aqDhsAlLRCZRdxAKgQccS8 Xqad4h7pw3hTm7FlOCrvHa/4YM7ASqAOFgNgWM8NUGlSkJwX29/N+CH0Jfl9vi5LmFdq boEtQl23bfKDFm4wvhjk6nQWMGJixVl/IfTJk8fzuHuHw+rtO7sWOWmfm2txs5aNhWkj LhGeAxvDNpny7es4K6ly72CpjMHQCMnob+UH8FhVjYH2QY1NNLdlDFqLcqj2afiWj+iF 0YRgmAUL5fAieeE4hLenbglj6ub8V9MYl8QNZUa4m8G3WmWHKzcs18AQ+AMnTRuDZnCq rL3Q== MIME-Version: 1.0 X-Received: by 10.180.93.74 with SMTP id cs10mr13009768wib.42.1370269625883; Mon, 03 Jun 2013 07:27:05 -0700 (PDT) Received: by 10.180.24.105 with HTTP; Mon, 3 Jun 2013 07:27:05 -0700 (PDT) In-Reply-To: References: <6941CDA6-21FB-4A37-A275-605BFFDE4C89@utt.fr> <39C72F8B-581A-4562-AC2A-59E46717F47C@gmail.com> Date: Mon, 3 Jun 2013 18:27:05 +0400 Message-ID: Subject: Re: commonjs in validation docs From: Alexander Shorin To: "user@couchdb.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi Travis, These docs are part of CouchDB project, so they are maintained as like as whole project. Feel free to contribute is you have or found something (; There is special guide how to quick start: http://docs.couchdb.org/en/latest/contributing.html -- ,,,^..^,,, On Mon, Jun 3, 2013 at 4:49 PM, Travis Paul wrote: > Ok, I feel better now. I saw Stephen's question last night and was about to > respond but was really confused after seeing those that docs. > Are those docs maintained by Apache or the community? Just wondering, I > haven't seen them before. > > Thanks > > > On Mon, Jun 3, 2013 at 4:12 AM, Alexander Shorin wrote: > >> On Mon, Jun 3, 2013 at 11:50 AM, Stephen Bartell >> wrote: >> > So then am I out of luck when it comes to requires in my validation docs? >> >> Why so? I'd a bit modified the example to remove views confusion: >> >> { >> "_id": "_design/test", >> "lib": { >> "security": "function user(userctx, secobj){\n return {\n >> is_admin: function(){ return userctx.roles.indexOf('_admin') !== -1 } >> \n } \n}\nexports.user = user;" >> }, >> "validate_doc_update": "function(newdoc, olddoc, userctx, secobj) >> {\n user = require('lib/security').user(userctx, secobj);\n if >> (!user.is_admin()) { throw({forbidden: '_admin role required'}) };\n}" >> } >> >> I believe the docs example is needed to be completely rewritted. >> >> >> -- >> ,,,^..^,,, >>