I have been trying to integrate this acl package but I can't get it to do anything - even throw errors. I've distilled it down about as simple as I can get and this is basically exactly from the example in their documentation:
import * as nodeAcl from 'acl';
...(DB initialization and other stuff happens here)...
acl = new nodeAcl(new nodeAcl.mongodbBackend(mongoose.connection.db, "acl_"));
debug("Testing ACL...");
acl.allow('guest', 'blogs', 'view');
acl.addUserRoles('joe', 'guest');
acl.isAllowed('joe', 'blogs', 'view', function(err, res){
if(res){
debug("User joe is allowed to view blogs")
}
debug("Callback was called...");
});
debug("done testing acl");
I just get "Testing ACL..." and "done testing acl" to my debug output and that's it. No errors, nothing written to the DB (which is working fine - I can write/read with it). Just nothing happens. Even an error would be welcome.