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

Can this plugin change a users role? #252

Open
travbus opened this issue Nov 22, 2018 · 3 comments
Open

Can this plugin change a users role? #252

travbus opened this issue Nov 22, 2018 · 3 comments
Labels

Comments

@travbus
Copy link

travbus commented Nov 22, 2018

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Version of PouchDB Authentication:
  • Version of PouchDB:
  • Platform name and version:
  • Operating System and version:
  • Server:
  • Link to your project:
@ptitjes
Copy link
Collaborator

ptitjes commented Nov 23, 2018

It can.

@travbus
Copy link
Author

travbus commented Nov 24, 2018

How abouts? I get how to write the validation rule in the _users _design/_auth doc to except it. But how do I pass the role. I tried code below with no luck

db.signUp('robin', 'dickgrayson', {
  metadata : {
    email : '[email protected]',
    birthday : '1932-03-27T00:00:00.000Z',
    likes : ['acrobatics', 'short pants', 'sidekickin\''],
  },
 roles : { ['basic']
  }
}, function (err, response) {
  // etc.
});

@travbus
Copy link
Author

travbus commented Nov 24, 2018

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

No branches or pull requests

2 participants