(backend, logger, options)
| 39 | contract.debug = true; |
| 40 | |
| 41 | var Acl = function (backend, logger, options){ |
| 42 | contract(arguments) |
| 43 | .params('object') |
| 44 | .params('object','object') |
| 45 | .params('object','object', 'object') |
| 46 | .end(); |
| 47 | |
| 48 | options = _.extend({ |
| 49 | buckets: { |
| 50 | meta: 'meta', |
| 51 | parents: 'parents', |
| 52 | permissions: 'permissions', |
| 53 | resources: 'resources', |
| 54 | roles: 'roles', |
| 55 | users: 'users' |
| 56 | } |
| 57 | }, options); |
| 58 | |
| 59 | this.logger = logger; |
| 60 | this.backend = backend; |
| 61 | this.options = options; |
| 62 | |
| 63 | // Promisify async methods |
| 64 | backend.endAsync = bluebird.promisify(backend.end); |
| 65 | backend.getAsync = bluebird.promisify(backend.get); |
| 66 | backend.cleanAsync = bluebird.promisify(backend.clean); |
| 67 | backend.unionAsync = bluebird.promisify(backend.union); |
| 68 | }; |
| 69 | |
| 70 | /** |
| 71 | addUserRoles( userId, roles, function(err) ) |
nothing calls this directly
no test coverage detected