Skip to content

Instantly share code, notes, and snippets.

@mstefaniuk
Created May 29, 2013 15:21
Show Gist options
  • Save mstefaniuk/5671127 to your computer and use it in GitHub Desktop.
Save mstefaniuk/5671127 to your computer and use it in GitHub Desktop.
== USER WITH USER ADMIN (or special group) PRIVILEGES ==
hoodie.user('adam@paradise.gov').addRole('farmer');
hoodie.store.create('valid/couchdb/dbname','skeleton');
hoodie.store.open('valid/couchdb/dbname').grantRole('farmer');
// role for managing users can be other than _admin because managed by node.js on behalf
// additional role in skeleton allowing to control who can create store from which kind of skeleton
== USER adam@paradise.gov ==
hoodie.store.open('valid/couchdb/dbname');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment