Portable business logic of MongoDB security model, mostly string formatting.
var security = require('mongodb-security');
security.humanize({cluster: true})
.should.equal('For the deployment');
security.humanize({collection: 'users', db: 'mscope'})
.should.equal('On mscope.users');
security.humanize({collection: '', db: 'mscope'})
.should.equal('On any any collection in the mscope database');
security.humanize({collection: 'users', db: ''})
.should.equal('On the users collection in any database');
Take the :resource
of a MongoDB grant and hand back a literate sentence prefix.
- tests
- move jade mixins currently in scope over hear
- use @imlucas/mongodb-ns