incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Marino <mmar...@gmail.com>
Subject Re: How to implement system hooks
Date Mon, 23 Sep 2013 16:50:44 GMT
Hi Thorsten,

I believe you're asking how to implement read/write permissions on a
database, but I'm a little bit confused by your subject.  If this is so,
the normal way is to use validate_doc_update functions in a design
document, e.g.:

http://docs.couchdb.org/en/latest/ddocs.html#validate-document-update-functions

http://guide.couchdb.org/editions/1/en/validation.html

You will see the first link describes the code you linked to.

Cheers and good luck,
Mike


On Mon, Sep 23, 2013 at 6:06 PM, Thorsten Scherler <scherler@gmail.com>wrote:

> Hi all,
>
> I just started to play around with couchdb and I was trying to implement
> the same behaviour of the user db in terms of read/write access. After a
> while I figured that the user db is special since the logic I want is
> implemented in after_doc_read of
>
> https://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=blob_plain;f=src/couchdb/couch_users_db.erl
>
> Now my question is how can I implement such a code in a custom database?
> I could not find find any guides to roll out your own db in this way.
> Can somebody point me to some docus or examples.
>
> TIA
>
> salu2
>
> --
> Thorsten Scherler <scherler.at.gmail.com>
> codeBusters S.L. - web based systems
> <consulting, training and solutions>
>
> http://www.codebusters.es/
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message