Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user to database members on signup #235

Open
fang0rnz opened this issue May 8, 2018 · 1 comment
Open

Add user to database members on signup #235

fang0rnz opened this issue May 8, 2018 · 1 comment

Comments

@fang0rnz
Copy link

fang0rnz commented May 8, 2018

Is this currently possible?

As of now I have a CouchDB instance with multiple databases. Each one of these databases represents a clinic that has several users with two possible roles: owner (would be database admin) and multiple
employees (would be members, for instance, a secretary who would be able to perform basic non admin crud operations).

What I want to accomplish is:
Using the signup method, add the user to members security config.

I have read all the docs and it seems to me that you have to be an instance / db admin to accomplish this. I thought about using a lambda function with admin permissions hardcoded when signing up in order to add the said user as a db member and then use pouchdb-authentication to login and operate the database normally but it seems a little hacky. Is this a correct approach?

@ptitjes
Copy link
Collaborator

ptitjes commented May 19, 2018

@fang0rnz PouchDB Authentication does not modify the security object of the database.
That plugin https://github.com/tyler-johnson/pouchdb-security-helper does however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants