Now its working. But I have an issue if I want to use existing db. Here is my code
var db = mongoose.connect(config.db, function(err) {
if (err) {
//
}
var storage = new RBAC.Storage.Mongoose({
connection: db.connection
});
var rbac = new RBAC(storage);
});
If I use this rbac
to create roles and permissions as
rbac.create(roles, permissionsAsObject, function(err, data) {
if(err) {
throw err;
}
});
It throws exception.
Note: In your test, you have created new db.
Hi, I am trying to figure out my way around the library, is it ready for Dynamoose?
I have my project with Dynamoose, which is kind of buggy as of now. Now I need to integrate RBAC but am not able to figure with just documentation. Are there any examples or blogpost giving a full blown example? Any type of help will be appreciated.