{"_id":"mongoose-authorize","_rev":"46-d8174c993854311b17051d97b0191abe","name":"mongoose-authorize","description":"Authorization (NOT authentication) plugin for mongoose","dist-tags":{"latest":"1.0.0-beta.19"},"versions":{"0.1.1":{"name":"mongoose-authorize","version":"0.1.1","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"mocha":"^2.0.1","should":"^4.3.0"},"dependencies":{"async":"^0.9.0","lodash":"^2.4.1","mongoose":"^3.8.19"},"gitHead":"5bf0417bee5c9d61b20d3ee296e53dabf0b78b80","_id":"mongoose-authorize@0.1.1","_shasum":"a8b10771fdba5173aa3751aaa5391fa0cbf13dd3","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"a8b10771fdba5173aa3751aaa5391fa0cbf13dd3","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-0.1.1.tgz","integrity":"sha512-dIiLVzqxkHvpDNbWUhML0T5Ii/O6YLRgbnwn3Hzxz+3oN2gK1zJh1uMdyO4CQ2ZPf350g2Dl+gkCqZ2iCkyiug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEucjPknBIYqXVryT9Q8nnZgx89T7tlu6F29SNJuIqSkAiB+6Lm1Oqw3sMF9SXeg1+O6DWmJiML8jhDg8aXzvSqQCw=="}]},"deprecated":"use walter-whitelist for authorizing read/write access to object properties"},"1.0.0-alpha":{"name":"mongoose-authorize","version":"1.0.0-alpha","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.0","mocha":"^2.1.0","should":"^4.4.2"},"dependencies":{"async":"^0.9.0","lodash":"^2.4.1","mongoose":"^3.8.21"},"gitHead":"04770552e0176fcc042ad997a4721ad9790c17c7","_id":"mongoose-authorize@1.0.0-alpha","_shasum":"a9992eac45fadd86b689a3b0161022a97ca09d47","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"a9992eac45fadd86b689a3b0161022a97ca09d47","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha.tgz","integrity":"sha512-NuNCbkdWHWqOc4r2LQBig+1W4Y5WzPJnih5DVXutfVVhVMXrUgj4YG0AxG/dDr4y0WTC2kTb3vttINzjJReilw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBkrAhrltLOnDMTc78C6sbHgSK+xRDon2xzXxgMEOqqwIgDWbVsftkqodU/MhYCpX9lmj7SeDHnHECWnKSiV9vQqc="}]}},"1.0.0-alpha-1":{"name":"mongoose-authorize","version":"1.0.0-alpha-1","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.0","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","should":"^4.6.1"},"dependencies":{"async":"^0.9.0","lodash":"^2.4.1","mongoose":"^3.8.21"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"c1b93c66c213fef335430261c5886196bf43cf68","_id":"mongoose-authorize@1.0.0-alpha-1","_shasum":"f369b55aee4cdb8c708945533dd5ab1f2bed1f56","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"f369b55aee4cdb8c708945533dd5ab1f2bed1f56","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-1.tgz","integrity":"sha512-GEYgxFfq5N15pBmaAR0U7XbOtzcr8V2Vow7gMzdMsVAPGuKMSmSrBNSTGs6WZ+G5iFcuK1284+QXRPp2y/soeg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAdV3c8DqJ6le7H31dsg3lA+V/PiRkaK3tn+OFTZL5sRAiEAxlfecJoXyIW4I1YTX0iQOTBV9rk34fOWKgKl+A7H6TM="}]}},"1.0.0-alpha-2":{"name":"mongoose-authorize","version":"1.0.0-alpha-2","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","should":"^4.6.1"},"dependencies":{"async":"^0.9.0","lodash":"^3.0.0","mongoose":"^3.8.22"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"ce2f2fd14ac468266cbc800dab3607b02fbfdc3a","_id":"mongoose-authorize@1.0.0-alpha-2","_shasum":"cf9bd23eee7066eb2874238766ee4cb130167a97","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"cf9bd23eee7066eb2874238766ee4cb130167a97","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-2.tgz","integrity":"sha512-2tbeIq/kEn4dsvtirSNElA+OWB5LzYB9RG+qPAs1tEhxEA5VIeDAJ1elyJ2ME5C2DkDPzuTn14r1PY9gLXkQqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUtCy/0GDdPfbB1INYd4OJ8LzekkbMHbLUvrWWfVubZwIgD0degikIJ5VX52VNOgfvcaw8PwlEPSYdToYRFXLBngM="}]}},"1.0.0-alpha-3":{"name":"mongoose-authorize","version":"1.0.0-alpha-3","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","should":"^4.6.1"},"dependencies":{"async":"^0.9.0","lodash":"^3.0.0","mongoose":"^3.8.22"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"eb5f0ac3a1d5f04f279e033debc55caa8991824e","_id":"mongoose-authorize@1.0.0-alpha-3","_shasum":"15f3f0193f626a4cfeb00babddb2a7a95f098f78","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"15f3f0193f626a4cfeb00babddb2a7a95f098f78","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-3.tgz","integrity":"sha512-zuzmre5pWK39wEVsjQUY7IR8WYlwEio5dY8Mzh0ZNYJTjwj2MRhS4u6iEMEh0xG3HhTm1BB0Rgh6QobPuIGvXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcNSews56CDK06pieR0gC5rRoLXUQSpTqvvlKHnh8PMAIgNe1MbjGGCe05L5XD1lC7YTbgLkmZpBM99ZHYxVswv7o="}]}},"1.0.0-alpha-4":{"name":"mongoose-authorize","version":"1.0.0-alpha-4","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","should":"^4.6.2"},"dependencies":{"async":"^0.9.0","lodash":"^3.0.1","mongoose":"^3.8.22"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"c67cd9e2258e00c5363e29de84602a2faacac99f","_id":"mongoose-authorize@1.0.0-alpha-4","_shasum":"d531836c09f46929e24c3cd76e78a31a82c17494","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"d531836c09f46929e24c3cd76e78a31a82c17494","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-4.tgz","integrity":"sha512-ibq9gTwWamCNeeUyxIc5YxpljfbGH4lDotKX7bl9igznG47VJNQZiIh/ORNiWptxijh+uS66OjKIUE/kB4n5WA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE5eTVpN5RSSm7SxqOTC9ETLEldSdVq8xaPkV1Wu7JXwIhAIKGVXMbLQJN7O5zNq7XZhF3d/bF9Bf/dSXsjeIxvopc"}]}},"1.0.0-alpha-5":{"name":"mongoose-authorize","version":"1.0.0-alpha-5","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","should":"^4.6.3"},"dependencies":{"async":"^0.9.0","lodash":"^3.1.0","mongoose":"^3.8.22"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"0f650e63bc5969dfcfb34f179b75c5fd14b77c11","_id":"mongoose-authorize@1.0.0-alpha-5","_shasum":"b4d98b80bfeda795f7780e114458b8d1de2a662e","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"b4d98b80bfeda795f7780e114458b8d1de2a662e","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-5.tgz","integrity":"sha512-Bzhg/Rvx/8sc2jUHLc8OPPLr9qj8N8Z5Ry+hzU88WjehDprj+a4KV49BnRzn3CUhvCHjle3SpcSYTk23uqM1Og==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvjTtIM4rdqujXCoeHDlOCd1Fyn4IyHRW4ZieJtgi2VwIgIe8/uuTzfbNhhlP+7xudmO3GpsNlMD7F9P3PIMtxlTc="}]}},"1.0.0-alpha-6":{"name":"mongoose-authorize","version":"1.0.0-alpha-6","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","should":"^5.0.0"},"dependencies":{"async":"^0.9.0","lodash":"^3.2.0","mongoose":"^3.8.23"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"8b7492018387b341b1b0238736b9545222ac498b","_id":"mongoose-authorize@1.0.0-alpha-6","_shasum":"39ebde4dd409694c5b49c2b56649d6a0d844f40e","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"39ebde4dd409694c5b49c2b56649d6a0d844f40e","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-6.tgz","integrity":"sha512-6Ke1wd9TgHQDfvOynNQCVA4vfHpX48w9UVaMCFXx7zHFoR6BEl0r1EAX6abPbA4zBIK9t0aeS1b8EI76+nO8Cg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHhfs/F1+oTqZ+V1cwovYwWlUS0lkcgLgEJf0uKxg2IWAiBpf15wy9Xk5QnrSzZ3sD/LlohtrX+73hi2zKCGFbqE8w=="}]}},"1.0.0-alpha-7":{"name":"mongoose-authorize","version":"1.0.0-alpha-7","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","should":"^5.0.0"},"dependencies":{"async":"^0.9.0","lodash":"^3.2.0","mongoose":"^3.8.23"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"a442e434ec7fa10fb8d6e28ae867e54cf5a0f410","_id":"mongoose-authorize@1.0.0-alpha-7","_shasum":"7e3112717aa42e177c890d1c238632a3b2470c43","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"7e3112717aa42e177c890d1c238632a3b2470c43","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-7.tgz","integrity":"sha512-JEyNZWFIaJwjQo3IOwbxANfOpabsFua8HeiJyJJtipvWfwFKU1q8QtsQFuAaF42Of09LgWCmiNTY6VMKkdVimg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQFd86GewFE353n4xempu/g/WZGRzJqjOOeN+ur71A1gIgCPb0mt9gBj/vlS/mApbVBhJFd/3OeAMYbi9YCrea1/4="}]}},"1.0.0-alpha-8":{"name":"mongoose-authorize","version":"1.0.0-alpha-8","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","should":"^5.0.0"},"dependencies":{"async":"^0.9.0","lodash":"^3.2.0","mongoose":"^3.8.23"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"54c9c4380473333d626f4e4351b45348bfe23589","_id":"mongoose-authorize@1.0.0-alpha-8","_shasum":"a4d2fc5c7fdde7500c1f2bde86feb759b9ec7932","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"a4d2fc5c7fdde7500c1f2bde86feb759b9ec7932","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-8.tgz","integrity":"sha512-zdPLKODImY06n6xQzXFRfQlO2K4MZWe5m+gLDj1SVRIuSIEQ+4VvxgDOEQK4sMJ+RvqraY7P93LkUu02vDukVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEKoGVJtIq4bSrM2jjXojCLlDhhi1Dus0dgcZ3YlGwPKAiEAwRG0FGGyUhVp5Sv0dMl0ytUlY1tX6RqekfAKNNxr9ag="}]}},"1.0.0-alpha-9":{"name":"mongoose-authorize","version":"1.0.0-alpha-9","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","should":"^5.0.1"},"dependencies":{"async":"^0.9.0","lodash":"^3.3.0","mongoose":"^3.8.23"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"c77544515dfbc44b482762659665df47eb87e87b","_id":"mongoose-authorize@1.0.0-alpha-9","_shasum":"3f3afdb529966aefc6a9186a8d50f6ae9b06b089","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"3f3afdb529966aefc6a9186a8d50f6ae9b06b089","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-9.tgz","integrity":"sha512-kC8jR254nG1VfmzS43iHgZf9us/TYpvRyMhOymNDRNstSPzUuoaNakHO1dd5KPMURqEwx07NllBu44xXCqPLZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDe515uFH5K6eHaMOYG40hbgHpSDkwhX6/9XzgJ8P5RDQIganZ8ddDeTrBBPaiJDnCQAS5IzeGP/MgVZf/5w26V8xk="}]}},"1.0.0-alpha-10":{"name":"mongoose-authorize","version":"1.0.0-alpha-10","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.2","should":"^5.0.1"},"dependencies":{"async":"^0.9.0","lodash":"^3.3.1","mongoose":"^3.8.24"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"335c6f78136072ea71c5b923e983f2d427258b8a","_id":"mongoose-authorize@1.0.0-alpha-10","_shasum":"18220491b3bcdff0f7e4261d8869e0ca00d1893a","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"18220491b3bcdff0f7e4261d8869e0ca00d1893a","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-10.tgz","integrity":"sha512-hC6rOusmuqzTxlsglknfqJQ9cMqf5RAaRwha6k1qcUj4QcJUXaaYn7PWR2ClX+2npSSprn+TFhho86dJWnGdZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiG1lU1FXLBHlHBnsPFahEe4o6IyQ1YavcuImORn7yOAiEAuObZshutgx0pbPky81CQpxsX6S3N7+dHNKsxXyEArbg="}]}},"1.0.0-alpha-11":{"name":"mongoose-authorize","version":"1.0.0-alpha-11","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.2.1","mocha-lcov-reporter":"0.0.2","should":"^5.1.0"},"dependencies":{"async":"^0.9.0","lodash":"^3.5.0","mongoose":"^3.8.24"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"27ec15a1f63819ba38b951910e133a7819cc9c11","_id":"mongoose-authorize@1.0.0-alpha-11","_shasum":"ad78e8993f0d7e38dc5866b5bebc780293be5755","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"ad78e8993f0d7e38dc5866b5bebc780293be5755","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-alpha-11.tgz","integrity":"sha512-C0UQAMgilSzoCK4VwX3voR6fe4tp0gDfpEaQqucyV1mC0wVnDT00ch/gtifWkrotWh2LdWE8NMhUq+s5v+w9AA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBIU//eWgx4pfdBJr6q3QMhCXQ3dTK9dId37MG1Pt7NUAiAbsnVbthKjuSrjpIcHc0X0B57a+ejkHYuGhQlROfpaEQ=="}]}},"1.0.0-beta.1":{"name":"mongoose-authorize","version":"1.0.0-beta.1","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.1","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.2.1","mocha-lcov-reporter":"0.0.2","should":"^5.2.0"},"dependencies":{"async":"^0.9.0","lodash":"^3.5.0","mongoose":"^3.8.25"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"bf5705e88257bda928727cfa4afa841e5e4989f3","_id":"mongoose-authorize@1.0.0-beta.1","_shasum":"7c5164250f76e9b02baa1170729770c79c85e4d0","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"7c5164250f76e9b02baa1170729770c79c85e4d0","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.1.tgz","integrity":"sha512-7csWBXLggO5DncKLR+UPWh4K08QtxM/DpwZlB53qaAUZi/M9KHgk8lHYnH+oYcsyjTyY4Gmj0FNNvJUwst0s8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG1OVKzTW4Txpr/Qz2Vlq9AZjI1nXHtH1ap072xTX7bvAiAmWAnoI/mrUkMkwXGo3aHs5tpmuCUahBBeXfnNWgLJ/w=="}]}},"1.0.0-beta.2":{"name":"mongoose-authorize","version":"1.0.0-beta.2","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.2","blanket":"^1.1.6","coveralls":"^2.11.2","mocha":"^2.2.1","mocha-lcov-reporter":"0.0.2","should":"^5.2.0"},"dependencies":{"async":"^0.9.0","lodash":"^3.6.0","mongoose":"^4.0.1"},"config":{"blanket":{"pattern":"lib","data-cover-never":"node_modules"}},"gitHead":"5d516e9311d5a81159c6a715c679f88f0816c311","_id":"mongoose-authorize@1.0.0-beta.2","_shasum":"edf109244607c1e68ee6a0c7ca4b5dff8ea178e0","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"edf109244607c1e68ee6a0c7ca4b5dff8ea178e0","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.2.tgz","integrity":"sha512-bSMJaYyQj+tWyn64Z/xwUxJ2+nzgHrC8DXLDFDVyigzF/fk5jj2exeIetGNsUs5x0woOA95B7G0jfH3uVmgmaw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC1MnmtZFOCSafxhJ9Xq/m0t8DJLYZoEdXC0Vl0ctAQ0AiEAv56EK/2v0PnMfHPbvAuu5jILKetbgpHtSJOfxyZ1vp0="}]}},"1.0.0-beta.3":{"name":"mongoose-authorize","version":"1.0.0-beta.3","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.2","blanket":"git+https://github.com/alex-seville/blanket.git#790c863c47fe50ef4dd1a411e2e6bf36c8cc6263","coveralls":"^2.11.2","mocha":"^2.2.4","mocha-lcov-reporter":"0.0.2","should":"^6.0.1"},"dependencies":{"async":"^0.9.0","lodash":"^3.7.0","mongoose":"^4.0.1"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"8acafb947bdbf21d5b3418f27441104d2a0e1422","_id":"mongoose-authorize@1.0.0-beta.3","_shasum":"99050ddb83e3228c9aa3e327db8e73275e9666ee","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"99050ddb83e3228c9aa3e327db8e73275e9666ee","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.3.tgz","integrity":"sha512-4+Kkb2+sdaTYTKofMSBcaOkyoqiQPOjrS2O0+K+TKK0ROkbeNh/f4UGhTSyGCCTHh40pwtk8oK1QdLnDw75wsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFo+zqogCOJpCLs7rwhL4u424WwGHn29AGScG+w/JPz9AiAuyCGJ4RJ+rhpFwOubog0LdvYDSkxMQ3XIPMQ1pGqzCQ=="}]}},"1.0.0-beta.4":{"name":"mongoose-authorize","version":"1.0.0-beta.4","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.2","blanket":"git+https://github.com/alex-seville/blanket.git#790c863c47fe50ef4dd1a411e2e6bf36c8cc6263","coveralls":"^2.11.2","mocha":"^2.2.4","mocha-lcov-reporter":"0.0.2","should":"^6.0.1"},"dependencies":{"async":"^0.9.0","lodash":"^3.7.0","mongoose":"^4.0.2"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"f93fc6c4c593e430066750872304a1cc00b78116","_id":"mongoose-authorize@1.0.0-beta.4","_shasum":"ac14639436899000f9a9f185bf79b150cf509276","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"ac14639436899000f9a9f185bf79b150cf509276","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.4.tgz","integrity":"sha512-IpMhcQ10Y2Q5gneQi5zmRNic6/j4MOCzqRhtxVOpJC+e8JEORxPDOohDLkyAdlusHIjN/5ZIsqz0N2WqTc7pGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHEoT2ml/FvN4PvBz0uPDzdsFU0Ta8FOecLcz5liNqBAAiEA08vgUauvTBVWyXZgCr3t1evJ4iNJ37KHLSvr59s/K6I="}]}},"1.0.0-beta.5":{"name":"mongoose-authorize","version":"1.0.0-beta.5","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhub/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhub/mongoose-authorize/issues"},"homepage":"https://github.com/paperhub/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.2","blanket":"git+https://github.com/alex-seville/blanket.git#790c863c47fe50ef4dd1a411e2e6bf36c8cc6263","coveralls":"^2.11.2","mocha":"^2.2.4","mocha-lcov-reporter":"0.0.2","should":"^6.0.1"},"dependencies":{"async":"^0.9.0","lodash":"^3.8.0","mongoose":"^4.0.2"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"31bec929fc19090babd7a749eab029e76ec27ff3","_id":"mongoose-authorize@1.0.0-beta.5","_shasum":"384231ce26c2c4319012cb00f4480c4c08c080c3","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"384231ce26c2c4319012cb00f4480c4c08c080c3","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.5.tgz","integrity":"sha512-hvd1ljXV9yLIxLdr144bOrAIj7AGch3SB52njUejusS3qVtVtqo2L5HJzjKUQXF03iYgzVEzJfaVEc9l5w7MXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIdAp8VDlbp9zAnvgZHJV2WJulElh3ixBpCzxe1BKnaAIhAMTo6Tlv4m287gUAt9n6IYA6CyZ3hjzYatNW8uBBAA8x"}]}},"1.0.0-beta.7":{"name":"mongoose-authorize","version":"1.0.0-beta.7","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.3","blanket":"1.1.7","coveralls":"^2.11.2","mocha":"^2.2.5","mocha-lcov-reporter":"0.0.2","should":"^6.0.1"},"dependencies":{"async":"^0.9.0","lodash":"^3.8.0","mongoose":"^4.0.3"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"d62f00522e0eabe32d4612e74e5553f644db48d3","_id":"mongoose-authorize@1.0.0-beta.7","_shasum":"b0d8011ced0c90ee944de9cb9182ea0d13ecf05e","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"b0d8011ced0c90ee944de9cb9182ea0d13ecf05e","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.7.tgz","integrity":"sha512-wF+E6a3wWgVxE/KXP9/+eagzThYVKR0Pzr5upO9XzDb/cvMOSZc/q3j5LVCut/SRvVEfTZ7RJZ80++JlLpp0mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICNqK8HGNANG2xHtj+gHfsjzmi3zi0MluwRwJNOiyALeAiEA1zUQb123MS7aWkwUd+b+NGIaECoRv2pxBxeg7rEwN08="}]}},"1.0.0-beta.8":{"name":"mongoose-authorize","version":"1.0.0-beta.8","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.3","blanket":"1.1.7","coveralls":"^2.11.2","mocha":"^2.2.5","mocha-lcov-reporter":"0.0.2","mongoose-erase":"^2.0.0","should":"^6.0.3"},"dependencies":{"async":"^1.0.0","lodash":"^3.9.2","mongoose":"^4.0.3"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"7312284c3d38318988ed1879f4e501b50555325e","_id":"mongoose-authorize@1.0.0-beta.8","_shasum":"f7783f97afdce1f8606dbffbd8c9c81291751e31","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"f7783f97afdce1f8606dbffbd8c9c81291751e31","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.8.tgz","integrity":"sha512-WLcpnoKxxNnygkZCGTPgfMttsnHKogX+q/xi0djDoyS9dWRooNDvkGqtKQ/+Hm7N9o4P6HbApgV8I8+URacB4w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCL/IlNB29lXWs/a+59P7HqaVbzdBspGRpzy37kcait2QIhAO8DMpxrNAGqlYcU/QV6WoXcu4rhreaD6T0eM1Ys4y7X"}]}},"1.0.0-beta.9":{"name":"mongoose-authorize","version":"1.0.0-beta.9","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.3","blanket":"1.1.7","coveralls":"^2.11.2","mocha":"^2.2.5","mocha-lcov-reporter":"0.0.2","mongoose-erase":"^2.0.1","should":"^6.0.3"},"dependencies":{"async":"^1.2.1","lodash":"^3.9.3","mongoose":"^4.0.5"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"9ec9592a332cf5bf4229d34d1ca76559bec86eeb","_id":"mongoose-authorize@1.0.0-beta.9","_shasum":"07120c3cfedea6f05f0ce95cf05dedd6cd30606c","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"07120c3cfedea6f05f0ce95cf05dedd6cd30606c","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.9.tgz","integrity":"sha512-JsWWqjmeqTjpdfNG+WoAPr/VG1iKq+yw7rTY0GHNGlyPURmzHeBZbaQBeWgspR3iEh7UH7Bh1ig7JJXr/4Ng3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID4QQJR85d70h9tSf0Fjurn/P/W1t3uqGiY80V5i7j0IAiEA4aVYBDXyNvPBG6R0yOWW7FtaNFIXMimDmfrDAlaE89M="}]}},"1.0.0-beta.10":{"name":"mongoose-authorize","version":"1.0.0-beta.10","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.3","blanket":"1.1.7","coveralls":"^2.11.2","mocha":"^2.2.5","mocha-lcov-reporter":"0.0.2","mongoose-erase":"^2.0.2","should":"^7.0.1"},"dependencies":{"async":"^1.2.1","lodash":"^3.9.3","mongoose":"^4.0.6"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"f4107cbdd850d69f6adf7878b63379214c19f7c0","_id":"mongoose-authorize@1.0.0-beta.10","_shasum":"702673e1d24cfa4b168df624c1831e7af06ceef0","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"702673e1d24cfa4b168df624c1831e7af06ceef0","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.10.tgz","integrity":"sha512-+x24g+kVmgJwqAicnhSyXAsuFMClcMC0QB4DWeC3p87pza7ftVF1IG8osjwIUBqhgGSBVK6rlIsruPkudCAYqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4nIPwWaqpt9yodS30HT6btU3ScYAhYPEFh4uZXbMHRgIgAK7MregDDjfjaRfl2Gh8FBZ1RTyv8PxTpzx7ktkgpHw="}]}},"1.0.0-beta.12":{"name":"mongoose-authorize","version":"1.0.0-beta.12","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.3","blanket":"1.1.7","coveralls":"^2.11.2","mocha":"^2.2.5","mocha-lcov-reporter":"0.0.2","mongoose-erase":"^2.0.4","should":"^7.0.2"},"dependencies":{"async":"^1.3.0","lodash":"^3.10.0","mongoose":"^4.0.7"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"4797144a6f9f7c4abd313fa0626277a054cf1768","_id":"mongoose-authorize@1.0.0-beta.12","_shasum":"6097fefd05432c0660720102a35ffb4c75bdafed","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"6097fefd05432c0660720102a35ffb4c75bdafed","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.12.tgz","integrity":"sha512-iVCmGon8Zd/JviF99wCE5E5vQaSMp/KhK3IexSpM4jcoEpyIDusW0e+nD1uIXs6xe6bJWJsGqZLcEVFMBFXUuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIt3dN5N1a/B4J9wjSMcrrFCaGLxYoTSzug5S+0JsR2AIhAMoRZFQu/spVqn81mgWju6CuQ2jxBfme/njeXSZdR48n"}]}},"1.0.0-beta.13":{"name":"mongoose-authorize","version":"1.0.0-beta.13","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.3","blanket":"1.1.7","coveralls":"^2.11.3","mocha":"^2.2.5","mocha-lcov-reporter":"0.0.2","mongoose-erase":"^2.0.5","should":"^7.0.2"},"dependencies":{"async":"^1.4.0","lodash":"^3.10.0","mongoose":"^4.0.8"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"a097508b830d09464400d4a7c6f5177b1eab4e0a","_id":"mongoose-authorize@1.0.0-beta.13","_shasum":"aae3001fd461bfd8b87841b8119872f7dfe6f748","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"aae3001fd461bfd8b87841b8119872f7dfe6f748","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.13.tgz","integrity":"sha512-IDjxvMkAF9MtOQHBLotH3ve9gRfQxnKwvRNzMaF3X0U/WvNdajyJ63LRIhjbmbJAsO2EkoM7atiHscbA2YG9fQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYQ11PtuuGYEi0UWP9QVj+NyS1TKA3WNWdbPnoLqEqvAIhAKfBLZXounROveArGkhf4PDkkFsEYU5VDXxW6sWO43Fl"}]}},"1.0.0-beta.14":{"name":"mongoose-authorize","version":"1.0.0-beta.14","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.4","blanket":"1.1.7","coveralls":"^2.11.3","mocha":"^2.2.5","mocha-lcov-reporter":"0.0.2","mongoose-erase":"^2.0.6","should":"^7.0.2"},"dependencies":{"async":"^1.4.0","lodash":"^3.10.0","mongoose":"^4.1.0"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"de1ae6d5c01b2194683b5fbd8305c9e1ddcd6a87","_id":"mongoose-authorize@1.0.0-beta.14","_shasum":"3fd131196c1da29c0b81e68f1754f30cb4174119","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"3fd131196c1da29c0b81e68f1754f30cb4174119","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.14.tgz","integrity":"sha512-KpyIL3eJWTeWbKdY5xFM1l7g0U0q7Tm0P5uaEcXJxjD72uns36xG1i3myjOqD0fDwDXa7b+KLxLpxkkXkjq1iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH78G9SASm3GIszgzOrO7qldv/DtUqBqfr1Du9Zb9KPcAiBDVKNndfLDtwft8T90otoeOy5WIioKq2buZKqMptnnbQ=="}]}},"1.0.0-beta.15":{"name":"mongoose-authorize","version":"1.0.0-beta.15","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"bcrypt":"^0.8.5","blanket":"1.1.7","coveralls":"^2.11.4","mocha":"^2.2.5","mocha-lcov-reporter":"0.0.2","mongoose-erase":"^2.0.7","should":"^7.0.4"},"dependencies":{"async":"^1.4.2","lodash":"^3.10.1","mongoose":"^4.1.2"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"fd1d743856c9461c9ea5fdb975c43ca38d1c8b69","_id":"mongoose-authorize@1.0.0-beta.15","_shasum":"2bf53de65867bfb5503a58ba54031a3d62b63d8e","_from":".","_npmVersion":"2.7.4","_nodeVersion":"1.6.3","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"2bf53de65867bfb5503a58ba54031a3d62b63d8e","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.15.tgz","integrity":"sha512-7zA7aivRU499BqGuHYvHD72/pgtQekUafHOt/fsP4m52dd+oTQlRO2ia/MiBufMX+R1CJGcsOc9dJx4VMrm6gA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZmpyMVU+ciLEiuTTOVAosiH50oITPjfyFkrH4XlxWwAiEAsLgFzh5xl5cILqTpeaoh+3iT90uvDifneclfD8Nsxv4="}]}},"1.0.0-beta.17":{"name":"mongoose-authorize","version":"1.0.0-beta.17","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"git+https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"blanket":"^1.1.9","coveralls":"^2.11.4","mocha":"^2.2.5","mocha-lcov-reporter":"^1.0.0","mongoose-erase":"^2.0.7","should":"^7.0.4"},"dependencies":{"async":"^1.4.2","lodash":"^3.10.1","mongoose":"^4.1.2"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"886fa8778a9c2f30358271ec6c11f3688cf0d44c","_id":"mongoose-authorize@1.0.0-beta.17","_shasum":"a0f5facc2860bac788940ac5625128948dc21db4","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"dist":{"shasum":"a0f5facc2860bac788940ac5625128948dc21db4","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.17.tgz","integrity":"sha512-/vsgMxLzE7VJWHW26NUCvfqnvjMAMJBRD57F5DMQd+/CG+ZwlWaTmb2GXl5sjJlmAg83/DPBsF7dsvjYRjd9mQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLFVTNBPn52TU1JolCyF0uQ2XIId2KMZmnKUlvc7vyJAiEA61mJqsBwYGSQPceyqXD4PZMi1jO2hyW/UFIUuV1hBMU="}]}},"1.0.0-beta.19":{"name":"mongoose-authorize","version":"1.0.0-beta.19","description":"Authorization (NOT authentication) plugin for mongoose","main":"index.js","scripts":{"test":"mocha","coveralls":"mocha --require blanket -R mocha-lcov-reporter | coveralls"},"repository":{"type":"git","url":"git+https://github.com/paperhive/mongoose-authorize.git"},"keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"author":{"name":"André Gaul","email":"andre@gaul.io"},"license":"GPL-3.0","bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"homepage":"https://github.com/paperhive/mongoose-authorize","devDependencies":{"blanket":"^1.1.9","coveralls":"^2.11.4","mocha":"^2.2.5","mocha-lcov-reporter":"^1.0.0","mongoose-erase":"^2.0.7","should":"^8.0.0"},"dependencies":{"async":"^1.4.2","lodash":"^3.10.1","mongoose":"^4.1.2"},"config":{"blanket":{"data-cover-only":"lib","data-cover-never":"node_modules"}},"gitHead":"1396bc027c7c1eedfa0362f702a033ae93c303d4","_id":"mongoose-authorize@1.0.0-beta.19","_shasum":"e58ec7b09e237803c0959433038b4b60949bba36","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.0","_npmUser":{"name":"andrenarchy","email":"andre@gaul.io"},"dist":{"shasum":"e58ec7b09e237803c0959433038b4b60949bba36","tarball":"https://registry.npmjs.org/mongoose-authorize/-/mongoose-authorize-1.0.0-beta.19.tgz","integrity":"sha512-nExjVTbZ9CbuwqqYNj8vKrg1keZB6SzjE3W+4I2mKCgtEM/U8MilAXkutNtzD8N7RBu7BqbJTsba2AcIaDoXgw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzqLITK3n7A/uwCjvfJjaioEYu75AMczXMR2X12fSC0AIhAKtJDJI6FAYPrJtICD5mA6TXvJgSUYgdpDsYRUUDkw8u"}]},"maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mongoose-authorize-1.0.0-beta.19.tgz_1459179667947_0.2791229975409806"}}},"readme":"# DEPRECATED!\n\nThis module is no longer maintained (March 2016). We recommend the lightweight module [walter-whitelist](https://github.com/paperhive/walter-whitelist) for authorizing read/write access to object properties.\n\n# mongoose-authorize\n[![Build Status](https://travis-ci.org/paperhive/mongoose-authorize.svg)](https://travis-ci.org/paperhive/mongoose-authorize) [![Coverage Status](https://coveralls.io/repos/paperhive/mongoose-authorize/badge.svg?branch=master)](https://coveralls.io/r/paperhive/mongoose-authorize?branch=master) [![Dependency Status](https://gemnasium.com/paperhive/mongoose-authorize.svg)](https://gemnasium.com/paperhive/mongoose-authorize)\n\n[![NPM](https://nodei.co/npm/mongoose-authorize.png?downloads=true)](https://nodei.co/npm/mongoose-authorize/)\n\nAn **authorization** (*not* authentication) plugin for mongoose.\n\nUsually not all fields of a document in your database are supposed to be read\nor written by all users of your application. This authorization plugin allows\nyou to\n\n * group your schema fields into components\n * specify permissions: which components can be accessed by whom (either\n   statically or dynamically and user-configurable in your documents)\n * organize multiple users in teams\n * serialize a mongoose document: get all fields for which a user has read\n   access (also takes care of nested schemas and populated referenced documents)\n * verify and set user-provided data in a mongoose document: only set the fields\n   for which a user has write access (note: work in progress)\n\nThe permission module in `mongoose-authorize` can be seen as a\n*role-based access control (RBAC)* system. Unlike other modules (e.g.,\n[mongoose-rbac](https://github.com/bryandragon/mongoose-rbac)), the permissions\nin `mongoose-authorize` do not have to be specified globally (e.g., inside the\nuser model) but can be maintained inside other entities such as organizations.\n\n## Example\n\nThe core idea of `mongoose-authorize` is to split a mongoose schema into\n*components* for which you can then define permissions. Let's take a look at\nthe following example:\n```javascript\nvar userSchema = new mongoose.Schema({\n  name: {type: String, component: 'info'},\n  passwordHash: String,\n  father: {type: mongoose.Schema.Types.ObjectId, ref: 'User', component: 'info'},\n  settings: {\n    rememberMe: {type: Boolean, component: 'settings'}\n  }\n});\n```\nHere we have used two components which are intended to impose the following\npermissions:\n * *info*: can be read by everyone but only written by the owner\n * *settings*: can only be read and written by the owner\n\nThis can be achieved with the `componentsPlugin`:\n```javascript\nvar authorize = require('mongoose-authorize')();\nuserSchema.plugin(authorize.componentsPlugin, {\n  permissions: {\n    defaults: {read: ['info']},\n    fromFun: function (doc, userId, action, done) {\n      // owner has full access to info and settings\n      if (doc._id.equals(userId)) return done(null, ['info', 'settings']);\n      // otherwise: no access (except the defaults specified above)\n      done(null, []);\n    }\n  }\n});\n```\n\nLet's create the model and add two users:\n```javascript\nmongoose.model('User', userSchema).create(\n  {name: 'Luke', passwordHash: '0afb5c', settings: {rememberMe: true}},\n  {name: 'Darth', passwordHash: 'd4c18b', settings: {rememberMe: false}},\n  function (err, luke, darth) {\n    luke.father = darth;\n    luke.save(function (err, luke) { /* ... */ });\n  }\n);\n```\n\nIn order to demonstrate this plugin's ability to properly process referenced\ndocuments we populate Luke's `father` field:\n```javascript\nluke.populate('father', function (err, luke) { /* ... */ });\n```\n\nLet's assume that Luke is authenticated and wants to have a representation\nof himself:\n```javascript\nluke.authorizedToObject(luke._id, function (err, obj) {\n  console.log(obj);\n});\n```\nResult:\n```javascript\n{ name: 'Luke',\n  settings: { rememberMe: true },\n  father: { name: 'Darth', _id: '549af64bd25236066b30dbe1' },\n  _id: '549af64bd25236066b30dbe0' }\n```\n\nNow let's assume that Darth is authenticated and wants to have a\nrepresentation of his son:\n```javascript\nluke.authorizedToObject(darth._id, function (err, obj) {\n  console.log(obj);\n});\n```\nResult:\n```javascript\n{ name: 'Luke',\n  father:\n   { name: 'Darth',\n     settings: { rememberMe: false },\n     _id: '549af64bd25236066b30dbe1' },\n  _id: '549af64bd25236066b30dbe0' }\n```\nNote that Luke's settings are missing in Darth's representation. However, Darth\nis allowed to see his own settings in the populated `father` field.\n\n\n## Documentation\n\n`mongoose-authorize` offers the following plugins:\n\n * [componentsPlugin](#componentsplugin)\n * [teamPlugin](#teamplugin)\n * [permissionsPlugin](#permissionsplugin)\n\n\n### componentsPlugin\n\n*Note: see the [above example](#example) for a brief in-use explanation of this\nplugin.*\n\nThe `componentsPlugin` works as follows for a schema\n\n 1. A `component` can be assigned to each field of the schema. The `component`\n    can either be\n    * a string: the static name of the component.\n    * a function `component(doc, callback)` where `doc` is the document\n      instance. The function should call the `callback` with a string (the\n      name of the component). This can be useful, e.g., for controlling the\n      visibility of fields with a `visible` field in your document.\n 2. The `componentPlugin` is loaded into the schema. You have to define\n    how the permissions of a user (identified by the user's document id, the\n    `userId`) are obtained. Therefore, the plugin accepts a `permissions` key in\n    the options object with the following sub-keys:\n\n     * `defaults`: an object mapping action strings to an array of component\n       strings. Useful for default permissions such as \"all users are able to\n       access the fields belonging to the component `'info'`.\n     * `fromFun(doc, userId, action, callback)`: a function that computes an\n       array of components where the `userId` can carry out the specified\n       `action` on the given `doc`. The `callback` has the signature\n       `callback(err, components)`.\n     * `fromDoc`: a boolean that indicates if the permissions should be read\n       from the document via the [permissionsPlugin](#permissionsplugin).\n\nFor a mongoose document `doc`, the plugin then offers the following methods:\n\n#### doc.authorizedComponents(userId, action, callback)\n\nCompile an array of all components where the provided `userId` has the\npermission to carry out the specified `action`.\n\n * `userId`: document id of a user.\n * `action`: a string representing an action (such as `'read'` or `'write'`).\n * `callback(err, components)`: the callback to be called where `components` is\n   an array of components.\n\n#### doc.authorizedToObject(userId, [options], callback)\n\nCreates an object representation (e.g., for serializing it to JSON via\n`JSON.stringify()`) of the document tailored for the provided `userId`, i.e.,\nan object where only the fields of the components are visible where the\nprovided `userId` has `'read'` access.\n\n * `userId`: document id of a user.\n * `options`: options passed to\n   [`toObject()`](http://mongoosejs.com/docs/api.html#document_Document-toObject)\n   which is used internally to serialize the document.\n * `callback(err, obj)`: the callback to be called with the object.\n\n#### doc.authorizedSet(userId, obj, callback)\n\nSet the provided object `obj` on the document if the provided `userId` has\n`'write'` access for all fields in `obj` (possibly nested, see below).\nIf the `userId` is not authorized, then the document remains unchanged.\n\n * `userId`: document id of a user\n * `obj`: a plain object. The following values are allowed:\n   * primitives: String, Number, Boolean, null\n   * plain objects: must correspond to a nested object (not referenced and\n     populated documents)\n   * arrays with primitives (arrays of subdocuments are not allowed and have to\n     be processed with the `authorizedArray...` methods, see below)\n * `callback(err)`\n\n#### doc.authorizedArrayPush(userId, array, obj, callback)\n\nPush the provided object `obj` as a subdocument to the array `array` on the\ndocument if the provided `userId` has `'write'` access for all fields in `obj`\n(possibly nested, see below) *and* for the array itself. If the `userId` is not\nauthorized, then the document remains unchanged.\n\n * `userId`: document id of a user\n * `array`: an array that is contained in the document\n * `obj`: a plain object. The following values are allowed:\n   * primitives: String, Number, Boolean, null\n   * plain objects: must correspond to a nested object (not referenced and\n     populated documents)\n   * arrays with primitives (arrays of subdocuments are not allowed in this\n     method and have to be processed with authorizedArrayPush separately)\n * `callback(err)`\n\n#### doc.authorizedArrayRemove(userId, array, id, callback)\n\nRemove the subdocument identified by `id` from the array `array` in the\ndocument if the provided `userId` has `'write'` access for the array. If the\n`userId` is not authorized, then the document remains unchanged.\n\n * `userId`: document id of a user\n * `array`: an array that is contained in the document\n * `id`: a subdocument id in `array`\n * `callback(err)`\n\n#### doc.authorizedArraySet(userId, array, id, obj, callback)\n\nUpdate the subdocument identified by `id` with the provided object `obj` as a\nsubdocument to the array `array` on the document if the provided `userId` has\n`'write'` access for all fields in `obj` (possibly nested, see below). If the\n`userId` is not authorized, then the document remains unchanged.\n\n * `userId`: document id of a user\n * `array`: an array that is contained in the document\n * `id`: a subdocument id in `array`\n * `obj`: a plain object. The following values are allowed:\n   * primitives: String, Number, Boolean, null\n   * plain objects: must correspond to a nested object (not referenced and\n     populated documents)\n   * arrays with primitives (arrays of subdocuments are not allowed in this\n     method and have to be processed with authorizedArraySet separately)\n * `callback(err)`\n\n### teamPlugin\n * organize users in teams\n * teams can be nested arbitrarily (cycles are properly handled)\n\nLet's take the following simple model of a user:\n```javascript\nmongoose.model('User', new mongoose.Schema({name: String}));\n```\nYours may be arbitrarily more complex, e.g., you may want to store a password hash in order to authenticate users.\n\nNow assume you want to organize users in teams. Let's create a team model with the `teamPlugin`:\n```javascript\nvar teamSchema = new mongoose.Schema({name: String});\nteamSchema.plugin(authorize.teamPlugin);\nmongoose.model('Team', teamSchema);\n```\n\nSo let's create an actual user and a team by filling the `members.users` and `members.teams` properties:\n```javascript\nvar async = require('async'); // makes code more readable\n\nasync.waterfall([\n  // create a user\n  function (cb) {\n    mongoose.model('User').create({name: 'hondanz'}, {name: 'halligalli'}, cb);\n  },\n  // create a team 'admins' with member user_hondanz\n  function(user_hondanz, user_halligalli, cb) {\n    mongoose.model('Team').create(\n      {\n        name: 'admins',\n        members: {\n          users: [user_hondanz],\n          teams: []\n        }\n      },\n      function (err, team_admins) {\n        if (err) return cb(err);\n        cb(null, user_halligalli, team_admins);\n      }\n    );\n  },\n  // create a team 'readers' with members user_halligalli and all members of team_admins\n  function (user_halligalli, team_admins, cb) {\n    mongoose.model('Team').create(\n      {\n        name: 'readers',\n        members: {\n          users: [user_halligalli],\n          teams: [team_admins]\n        }\n      },\n      cb\n    );\n  }],\n  function (err, team_readers) {\n    if (err) return console.error(err);\n    // use team_readers, e.g., team_readers.getUserIds(...), see below\n  }\n);\n```\n#### teamPlugin.getUserIds(callback)\nBecause teams may have users *and* teams as members, the team plugin offers `getUserIds` to get a flat array of all members' userIds.\n\n * `callback(err, userIds)` where userIds is an array of all members' userIds (includes members of nested teams).\n\n##### Example\n```javascript\nteam_readers.getUserIds(function (err, userIds) {\n  if (err) return console.error(err);\n  // userIds now contains: [user_halligalli._id, user_hondanz._id]\n});\n```\n\n### permissionsPlugin\n * grant and check permissions for actions on ressources to teams\n\nAssume you store articles and you want to grant permissions on this article. Let's use the `permissionsPlugin` for this:\n```javascript\nvar articleSchema = new mongoose.Schema({title: String, body: String});\narticleSchema.plugin(authorize.permissionsPlugin);\nmongoose.model('Article', articleSchema);\n```\nNow we can create an article and assign permissions for the teams created above by filling the property `permissions`:\n```javascript\nmongoose.model('Article').create(\n  {\n    title: 'most interesting article ever',\n    body: 'lorem ipsum',\n    permissions: [\n      {team: team_readers, action: 'read', ressource: 'body'},\n      {team: team_admins, action: 'write', ressource: 'body'}\n    ]\n  },\n  function (err, article) {\n    if (err) return console.error(err);\n    // use article, e.g., article.getPermissions() or\n    // article.hasPermissions(userId, action, ressource), see below\n  }\n);\n```\n\n#### permissionsPlugin.getPermissions(callback)\n\nReturns an array of all permissions with flattened userIds.\n\n * `callback(err, permissions)` where permissions is an array of permissions, each having the properties\n    * `userIds`: the provided team is resolved to userIds via [teamPlugin.getUserIds](#teamplugingetuseridscallback)\n    * `action`: the string as provided in the permission\n    * `ressource`: the string as provided in the permission\n\n##### Example\n```javascript\narticle.getPermissions(function (err, permissions) {\n  if (err) return console.error(err);\n  /* permissions contains:\n    [\n      {userIds: [user_halligalli._id, user_hondanz._id], action: 'read', ressource: 'body'},\n      {userIds: [user_hondanz._id], action: 'write', ressource: 'body'},\n    ]\n  */\n});\n```\n\n#### permissionsPlugin.hasPermissions(userId, action, ressource, callback)\n\n * `userId`: a userId string\n * `action`: a string\n * `ressource`: a string\n * `callback(err, granted)`: `granted` is true if and only if the provided user has the permission to perform the specified action on the specified ressource.\n\n##### Example\n```javascript\narticle.hasPermissions(user_halligalli._id, 'write', 'body', function (err, granted) {\n  if (err) return console.error(err);\n  // granted is false\n});\narticle.hasPermissions(user_hondanz._id, 'read', 'body', function (err, granted) {\n  if (err) return console.error(err);\n  // granted is true\n});\n```\n","maintainers":[{"name":"andrenarchy","email":"andre@gaul.io"}],"time":{"modified":"2022-06-20T06:52:25.291Z","created":"2014-12-08T16:57:12.060Z","0.1.1":"2014-12-08T16:57:12.060Z","1.0.0-alpha":"2015-01-13T13:59:47.322Z","1.0.0-alpha-1":"2015-01-27T17:12:32.892Z","1.0.0-alpha-2":"2015-01-27T18:45:28.090Z","1.0.0-alpha-3":"2015-01-29T16:56:24.526Z","1.0.0-alpha-4":"2015-02-02T09:57:05.900Z","1.0.0-alpha-5":"2015-02-04T10:28:58.870Z","1.0.0-alpha-6":"2015-02-16T10:40:07.133Z","1.0.0-alpha-7":"2015-02-17T15:59:15.088Z","1.0.0-alpha-8":"2015-02-17T17:02:59.829Z","1.0.0-alpha-9":"2015-02-23T18:38:26.888Z","1.0.0-alpha-10":"2015-03-02T09:37:26.928Z","1.0.0-alpha-11":"2015-03-10T11:49:34.648Z","1.0.0-beta.1":"2015-03-18T12:50:39.986Z","1.0.0-beta.2":"2015-03-31T15:11:01.021Z","1.0.0-beta.3":"2015-04-20T07:49:05.384Z","1.0.0-beta.4":"2015-04-27T09:20:15.701Z","1.0.0-beta.5":"2015-05-04T15:24:12.033Z","1.0.0-beta.7":"2015-05-18T11:05:26.990Z","1.0.0-beta.8":"2015-05-25T18:43:54.477Z","1.0.0-beta.9":"2015-06-08T16:28:03.511Z","1.0.0-beta.10":"2015-06-22T06:30:11.279Z","1.0.0-beta.12":"2015-07-13T09:03:56.439Z","1.0.0-beta.13":"2015-07-23T12:18:06.083Z","1.0.0-beta.14":"2015-07-28T15:16:54.445Z","1.0.0-beta.15":"2015-08-16T16:05:29.767Z","1.0.0-beta.17":"2015-10-25T10:31:22.611Z","1.0.0-beta.19":"2016-03-28T15:41:08.963Z"},"homepage":"https://github.com/paperhive/mongoose-authorize","keywords":["mongoose","security","authorize","authorization","permission","role","rbac"],"repository":{"type":"git","url":"git+https://github.com/paperhive/mongoose-authorize.git"},"author":{"name":"André Gaul","email":"andre@gaul.io"},"bugs":{"url":"https://github.com/paperhive/mongoose-authorize/issues"},"license":"GPL-3.0","readmeFilename":"README.md","users":{"bdentino":true}}