couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <d...@muse.net.nz>
Subject Re: How do non-admin users get roles in a couchapp?
Date Fri, 17 Aug 2012 08:04:29 GMT
On 17 August 2012 09:58, Dave Cottlehuber <dave@muse.net.nz> wrote:

Oops, lost some text there.

> I'd be interested to see what other options are proposed for this, but
> I'd use the changes feed on _users while connected as an admin. This
> seems the most sensible to me:
>
> GET /_users/_changes?feed=continuous&since=3&include_docs=true HTTP/1.1

> I'd likely do this as an external handler so couchdb ensures that it's
> always running when CouchDB is:
>
> http://couchdb.readthedocs.org/en/latest/1.1/other.html?highlight=os_daemons
> & some more details http://davispj.com/2010/09/26/new-couchdb-externals-api.html

You'd probably want to include a filter to catch only users with an
empty doc.roles and then subscribe them using some rules to the
appropriate database roles.

A+
Dave

Mime
View raw message