bookshelf-multi-mask
v0.1.3
Published
This Bookshelf.js plugin enables you to define masks on your models and serialize to JSON based on its fields using the json-mask API. It is based on bookshelf-mask, but it allows you to specify an array of scopes instead of just one.
Downloads
27
Readme
bookshelf-multi-mask
This Bookshelf.js plugin enables you to define masks on your models and serialize to JSON based on its fields using the json-mask API. It is based on bookshelf-mask, but it allows you to specify an array of scopes instead of just one. This is useful for ACL where a user may be part of multiple groups/roles.
Installation & Usage
Usage is the same as the plugin this module is based on: bookshelf-mask.
The only difference is using arrays when using the mask method:
model.mask(['custom', 'admin']);