incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <kxe...@gmail.com>
Subject Re: commonjs in validation docs
Date Mon, 03 Jun 2013 14:27:05 GMT
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 <Tr@vispaul.me> 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 <kxepal@gmail.com> wrote:
>
>> On Mon, Jun 3, 2013 at 11:50 AM, Stephen Bartell <snbartell@gmail.com>
>> 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.
>>
>>
>> --
>> ,,,^..^,,,
>>

Mime
View raw message