{"_id":"mongoose-role","_rev":"31-969b326a3ea4409054a7e6394b1f2d88","name":"mongoose-role","description":"Adds a role and access level functionality to a model","dist-tags":{"latest":"3.0.5"},"versions":{"1.0.0":{"name":"mongoose-role","version":"1.0.0","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"test":"mocha","coverage":"istanbul cover ./node_modules/mocha/bin/_mocha","codeclimate":"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/.bin/codeclimate && rm -rf ./coverage"},"repository":{"type":"git","url":"https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","devDependencies":{"codeclimate-test-reporter":"0.0.3","expect.js":"^0.3.1","istanbul":"^0.3.2","mocha":"^1.21.4","mocha-lcov-reporter":"0.0.1","mongoose":"^3.8.16"},"dependencies":{"lodash.defaults":"^2.4.1"},"gitHead":"10cd93b6fae909fff2bbce81c20efca2c922ec6a","_id":"mongoose-role@1.0.0","_shasum":"6e2bedc80ea4581a1bfe880185ece5069c20d79b","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"ksmithut","email":"ksmith.ut@gmail.com"},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"dist":{"shasum":"6e2bedc80ea4581a1bfe880185ece5069c20d79b","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-1.0.0.tgz","integrity":"sha512-gh9pb+o+33L80JDBNeoWw89c4G+yaj0yUQ2pYs2+GXrT3akJmfSie5yYNhKE2lDT6FWIp5sjr3nW8Do5LIt/yg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH/XBKpkpvY6ObdLPv15xuPo3zHvKwVP3uF+dt7obkwkAiAFc2q76TEA8Vh88lEaAvILc106clwohRdoQpp3YdkmkA=="}]},"deprecated":"This module is no longer being maintained. Please reach out to package author if you wish to take over maintenance.","directories":{}},"1.0.1":{"name":"mongoose-role","version":"1.0.1","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"test":"mocha","coverage":"istanbul cover ./node_modules/mocha/bin/_mocha","codeclimate":"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/.bin/codeclimate && rm -rf ./coverage"},"repository":{"type":"git","url":"https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","devDependencies":{"codeclimate-test-reporter":"0.0.3","expect.js":"^0.3.1","istanbul":"^0.3.2","mocha":"^1.21.4","mocha-lcov-reporter":"0.0.1","mongoose":"^3.8.16"},"dependencies":{"lodash.defaults":"^2.4.1"},"gitHead":"746eba4f5a4b40e73f750d358f39c751020ceb29","_id":"mongoose-role@1.0.1","_shasum":"44482e99441dbf72664f7629890f808fc7771c86","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"ksmithut","email":"ksmith.ut@gmail.com"},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"dist":{"shasum":"44482e99441dbf72664f7629890f808fc7771c86","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-1.0.1.tgz","integrity":"sha512-0FlS1Ff1Xe/l7SLzmOqUxDm+992OgoviOzUsddfU+zRreBHQd6DqEkwutLEIdRXL+vqeNMr1Vrol/BvsJZL/jA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDy8JL9ItoxaJ7l/8nn64v57P35qSUiM0RzGYBwoW83IgIgYGt3saGS+fDsoUZ7J47778qEtt8skGvALCA6S4bED9I="}]},"deprecated":"This module is no longer being maintained. Please reach out to package author if you wish to take over maintenance.","directories":{}},"1.1.0":{"name":"mongoose-role","version":"1.1.0","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"test":"mocha","coverage":"istanbul cover ./node_modules/mocha/bin/_mocha","codeclimate":"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/.bin/codeclimate && rm -rf ./coverage"},"repository":{"type":"git","url":"https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","devDependencies":{"codeclimate-test-reporter":"0.0.3","expect.js":"^0.3.1","istanbul":"^0.3.2","mocha":"^1.21.4","mocha-lcov-reporter":"0.0.1","mongoose":"^3.8.16"},"dependencies":{"lodash.defaults":"^2.4.1"},"gitHead":"5a0666de68aae844aef883e122632fc24ec258e6","_id":"mongoose-role@1.1.0","_shasum":"c7f9cde7d18a9655c1682acfc23e156ef06ca34e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"ksmithut","email":"ksmith.ut@gmail.com"},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"dist":{"shasum":"c7f9cde7d18a9655c1682acfc23e156ef06ca34e","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-1.1.0.tgz","integrity":"sha512-nsFWLQ12noiSgVe1bRiFZEqY92iD67QBsN8sLRcesYknx821/EYYZQVgNBTQ1U+HL1ISC2zIxhP39tnABcKTdQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfRzogWGRf29CSGV9fECgC5aLOVsePwzK6Xe3blkZzrAIgFoS52PBcg+H4GGNm9U3DzeR1uvJqDPAxrZDbAdsWKt0="}]},"deprecated":"This module is no longer being maintained. Please reach out to package author if you wish to take over maintenance.","directories":{}},"1.1.1":{"name":"mongoose-role","version":"1.1.1","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"test":"mocha","coverage":"istanbul cover ./node_modules/mocha/bin/_mocha","codeclimate":"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/.bin/codeclimate && rm -rf ./coverage"},"repository":{"type":"git","url":"https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","devDependencies":{"codeclimate-test-reporter":"0.0.4","expect.js":"^0.3.1","istanbul":"^0.3.5","mocha":"^2.0.1","mocha-lcov-reporter":"0.0.1","mongoose":"^3.8.20"},"dependencies":{"lodash.defaults":"^2.4.1"},"gitHead":"03d214c076431df3ea9fc1481f04020ceea1586c","_id":"mongoose-role@1.1.1","_shasum":"0599a62d0fc055d4cd97c23e1a64ed03a090182c","_from":".","_npmVersion":"2.1.7","_nodeVersion":"0.10.33","_npmUser":{"name":"ksmithut","email":"ksmith.ut@gmail.com"},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"dist":{"shasum":"0599a62d0fc055d4cd97c23e1a64ed03a090182c","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-1.1.1.tgz","integrity":"sha512-GTnUFK/epzMSv2S3OLes8CW2I2txZWhG6J8UsO9aW3gM5M06SrygCSUz350apPi/VlByQm126eWkQYijsLfwXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEWbMIE2R0rQU5cyS/sO160AWf8KZx1Q4mmjewMK2tFQIhAPRC6aSKANRD02hKWlMdfkMW1QDuz8SmfMaPbTH4R8e4"}]},"deprecated":"This module is no longer being maintained. Please reach out to package author if you wish to take over maintenance.","directories":{}},"1.1.2":{"name":"mongoose-role","version":"1.1.2","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"jshint":"jshint --reporter node_modules/jshint-stylish/stylish.js index.js","check-cov":"istanbul check-coverage --statements 100 --functions 100 --branches 100 --lines 100","test":"istanbul cover _mocha","posttest":" npm run check-cov; npm run jshint;","codeclimate":"cat ./coverage/lcov.info | codeclimate"},"repository":{"type":"git","url":"https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","devDependencies":{"codeclimate-test-reporter":"0.0.4","expect.js":"^0.3.1","istanbul":"^0.3.5","jshint":"^2.6.0","jshint-stylish":"^1.0.0","mocha":"^2.1.0","mocha-lcov-reporter":"0.0.1","mongoose":"^3.8.23"},"dependencies":{"defaults":"^1.0.0","lodash.defaults":"^2.4.1"},"gitHead":"3533f679ae9d300237c91e339ab020a0bbb2275d","_id":"mongoose-role@1.1.2","_shasum":"17daade6f195bfb60f7f05d0feaf41ca77ea8d72","_from":".","_npmVersion":"2.4.1","_nodeVersion":"1.1.0","_npmUser":{"name":"ksmithut","email":"ksmith.ut@gmail.com"},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"dist":{"shasum":"17daade6f195bfb60f7f05d0feaf41ca77ea8d72","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-1.1.2.tgz","integrity":"sha512-SnnJX6CImdAwr+qOUhhRe57mNkPaapetc9EOYau3ge9UFT1fmO5EEfLU6peVw4zpUGUsT6F6cmPDEhLFupRE2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFXg6HuSRvedLFXYsSdNZ5yfvw0luO4oxOf8UdaiczPEAiAedkzA8ju511lJWf++qMfSIPWcdb9cxAmz0ou86Qm5WA=="}]},"deprecated":"This module is no longer being maintained. Please reach out to package author if you wish to take over maintenance.","directories":{}},"1.2.0":{"name":"mongoose-role","version":"1.2.0","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"jshint":"jshint --reporter node_modules/jshint-stylish/index.js index.js","check-cov":"istanbul check-coverage --statements 100 --functions 100 --branches 100 --lines 100","test":"istanbul cover _mocha","posttest":" npm run check-cov; npm run jshint;","codeclimate":"cat ./coverage/lcov.info | codeclimate"},"repository":{"type":"git","url":"git+https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","devDependencies":{"chai":"^3.4.1","codeclimate-test-reporter":"0.3.0","expect.js":"^0.3.1","istanbul":"^0.4.2","jshint":"^2.6.0","jshint-stylish":"^2.1.0","mocha":"^2.1.0","mocha-lcov-reporter":"1.0.0","mongoose":"^4.3.6"},"dependencies":{"object-assign":"^4.0.1"},"gitHead":"599d33f19284558783044b8467a53ae28a622f8d","_id":"mongoose-role@1.2.0","_shasum":"683844fad2e82ddcda1f02a3d6c1454901549365","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"ksmithut","email":"ksmith.ut@gmail.com"},"dist":{"shasum":"683844fad2e82ddcda1f02a3d6c1454901549365","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-1.2.0.tgz","integrity":"sha512-qGqI3M0mBc0ksRtRkD6WqpaXDgAXP84GwYpmbT3+yq3AR5i5Og55a+6nREpbgyl+5QvwbQPlf6ia5ZqMSU1zFg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCY+3ZUCedT0au7xzk2S0AaSYsbd6WvbzH3672I8TyonwIhAMIjVTFAL09N5sMDPVuhIrap+U1FYncQ9egkuSJJgBJF"}]},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"deprecated":"This module is no longer being maintained. Please reach out to package author if you wish to take over maintenance.","directories":{}},"2.0.0":{"name":"mongoose-role","version":"2.0.0","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"jshint":"jshint --reporter node_modules/jshint-stylish/index.js index.js","check-cov":"istanbul check-coverage --statements 100 --functions 100 --branches 100 --lines 100","test":"istanbul cover _mocha","posttest":" npm run check-cov; npm run jshint;","codeclimate":"cat ./coverage/lcov.info | codeclimate"},"repository":{"type":"git","url":"git+https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","devDependencies":{"chai":"^3.5.0","codeclimate-test-reporter":"^0.3.3","expect.js":"^0.3.1","istanbul":"^0.4.5","jshint":"^2.9.3","jshint-stylish":"^2.2.1","mocha":"^3.0.2","mocha-lcov-reporter":"^1.2.0","mongoose":"^4.6.0"},"dependencies":{"object-assign":"^4.1.0"},"gitHead":"796bfd22b34863324d292ec301fbc06517d5f2f6","_id":"mongoose-role@2.0.0","_shasum":"0feacac4148ca2abbc1d68458ffd5345f2c11c3a","_from":".","_npmVersion":"2.15.1","_nodeVersion":"0.10.45","_npmUser":{"name":"ksmithut","email":"ksmith.ut@gmail.com"},"dist":{"shasum":"0feacac4148ca2abbc1d68458ffd5345f2c11c3a","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-2.0.0.tgz","integrity":"sha512-wnqWeDKecPRoVjYttJCmsdbRUpMZHksbW9UE1Qhblv/kKZ+f8T+Mm+sQfLNTHCOBO2il15u+5X4dUZWAywnzpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHtDFayRMdL5BlpMoihT+V+fSf5AJ/txxHmqO5Dx2M7FAiEApBeFZv8afEkckgQB8GIrMXwtXn0ShsURG0LuIXVEZrg="}]},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/mongoose-role-2.0.0.tgz_1473776507533_0.4375165232922882"},"deprecated":"This module is no longer being maintained. Please reach out to package author if you wish to take over maintenance.","directories":{}},"2.0.1":{"name":"mongoose-role","version":"2.0.1","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"pretest":"npm run lint","test":"istanbul cover _mocha","posttest":"istanbul check-coverage --statements 100 --lines 100 --branches 100 --functions 100","lint":"standard","codeclimate":"cat ./coverage/lcov.info | codeclimate-test-reporter"},"repository":{"type":"git","url":"git+https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","eslintConfig":{"root":true,"extends":["standard"]},"devDependencies":{"chai":"^4.0.1","codeclimate-test-reporter":"^0.5.0","istanbul":"^0.4.5","mocha":"^3.0.2","mocha-lcov-reporter":"^1.2.0","mongoose":"^4.6.0","standard":"^10.0.2"},"gitHead":"bad1e92c0e54b57b06efb9001d519283e3d55cc0","_id":"mongoose-role@2.0.1","_npmVersion":"5.0.0","_nodeVersion":"8.0.0","_npmUser":{"name":"ksmithut","email":"ksmith.ut@gmail.com"},"dist":{"integrity":"sha512-V8gy9dE6QcIfgYe64InJbxs+ANLjb3krpDfR1LoF3S70C/E9PWJ4XR/Min/E/HkdA1Y27VOIwFq9NLdTW4NR9Q==","shasum":"6ec1477b9a9a5ef7023ddd2d83c66e9369012953","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-2.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrnwI3oj887nXbBEB51oquYJCSqCjRPX4kRup+jDbsogIhAMdy4AArhhhF1Uj40kKQCqWMcmdjtB8klF9ndkNyvhox"}]},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mongoose-role-2.0.1.tgz_1496351308087_0.9779407465830445"},"deprecated":"This module is no longer being maintained. Please reach out to package author if you wish to take over maintenance.","directories":{}},"3.0.0":{"name":"mongoose-role","version":"3.0.0","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"pretest":"npm run lint","test":"istanbul cover _mocha","posttest":"istanbul check-coverage --statements 100 --lines 100 --branches 100 --functions 100","lint":"standard","codeclimate":"cat ./coverage/lcov.info | codeclimate-test-reporter"},"repository":{"type":"git","url":"git+https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","eslintConfig":{"root":true,"extends":["standard"]},"devDependencies":{"chai":"^4.2.0","codeclimate-test-reporter":"^0.5.1","istanbul":"^0.4.5","mocha":"^5.2.0","mocha-lcov-reporter":"^1.3.0","mongoose":"^5.4.3","standard":"^12.0.1"},"gitHead":"121775759501900ee07fdc7183791833d49f4fb6","_id":"mongoose-role@3.0.0","_npmVersion":"6.5.0-next.0","_nodeVersion":"11.6.0","_npmUser":{"name":"ksmithut","email":"ksmith.ut@gmail.com"},"dist":{"integrity":"sha512-GDU+Y0eKPHEOjnSq/iRlWRiXfPc9cryj5X0QteUvGlnbooG11ZXF/u8CeUj2B3vdvj/fLUYKJ8h/fh5z6s8QTA==","shasum":"a1b9786e704ca84f77f69a2db98cc9e9f9a48575","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-3.0.0.tgz","fileCount":4,"unpackedSize":9040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPKj+CRA9TVsSAnZWagAA59UP/RM6VHdjhFcQKHprAiM5\nRvOa3jThINULlf4DTwF9xf12+vp1dyBy3Y3UaXvIayMwVWFW202OIaIs1mUz\niJipcIokQrWFnIxDWyAWj5/oifi89/KxSVw7xliw2W9R4OkY0gWlSNSvdcAt\nG15DpD4KRHoaDgNUSU3FSWIyxGpjgOtUyDE/QBvs6qUQfxPO3X6LQwB/EVVk\nu1V+8hDynGgDVQRLq8hA+QCOi499PEGKjUjW4hUOsE5Ttyd2hUc7JTaxynR7\n/C5zwp3e2FyIGbF0kOhydQXqrYZuwdEeyR7lV9rPGTulef0UwtXNboXXwkuk\nlfM4kNmZZI/HHkv1FCLURp5AbQfn8KVWxyx8RWky9MzgRgG464OfCwU/VZSb\ncaWz//yDZVRtw+ksN1DO7aSo53n84JqkyVUjnjEdDb+mKfzkY2cCgMj3gMRV\njBsfDMeAv9+a+taMFIWlwkTPfXippY/QyHMgL2Bdfs02VloEfE5veWdbJF6D\nBjo+1/T61GYoY+DBPNdns3iVe1z57UnEcPv26NtGz0aCxAOojQRZOoZhE42S\n3qJTUSU65kWPH97faAL04LO2jhg533GEfU0/UslBsk67duTQ5Is85ASwOUh4\nKQd0+tBGxRLAwzE63yz8O+d6wLEdLSYn/vsPfH1HPJPRu8dL+pwU9D7A+iU8\ntm46\r\n=35kZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHn+zeobKBznxpRMkiZY83ql/HK0ZBSOamp3VPA56vc+AiB13pVeC2/YGR1Sw16+YymZvNeTOB17jXWJf18bjnHxpA=="}]},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mongoose-role_3.0.0_1547479294225_0.9766296257082603"},"_hasShrinkwrap":false},"3.0.2":{"name":"mongoose-role","version":"3.0.2","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"pretest":"npm run lint","test":"istanbul cover _mocha","posttest":"istanbul check-coverage --statements 100 --lines 100 --branches 100 --functions 100","lint":"standard","codeclimate":"cat ./coverage/lcov.info | codeclimate-test-reporter"},"repository":{"type":"git","url":"git+https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","eslintConfig":{"root":true,"extends":["standard"]},"devDependencies":{"chai":"^4.2.0","codeclimate-test-reporter":"^0.5.1","istanbul":"^0.4.5","mocha":"^6.1.4","mocha-lcov-reporter":"^1.3.0","mongoose":"^5.5.13","standard":"^12.0.1"},"gitHead":"aa54f088b65cd3e84759fc2ccb5eadb2761b63de","_id":"mongoose-role@3.0.2","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-XBJE3ipkwt4ZUmi6a2fMCq012vlhUH07761kVzgLMTg7iD/bZuLoX/XmqbyOUOz3EK8EfTmSkx6Sluo4VChSSA==","shasum":"7614598f3ba4fbb9d9d343fb7196b8bae0591ca2","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-3.0.2.tgz","fileCount":4,"unpackedSize":9041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+Ii3CRA9TVsSAnZWagAAyj8P/AnmhTd0TfOgDVrG+7lQ\nbQE2zu8fmPGBG1kGRpgawQwmu63SmCAQqo0hSfLbuXwpqXPDuFoXttXA2CtQ\ne35uK6fhfueVHn8ek4EQ5iqbWmjW1qYspEQCDocZ4VMBah4Q6uU+sDNuYUxR\nYLqAr4e4pGozjIsCGJsuZUX1rsRad4mNIENgvV5CH7QaPdeD8Rxs7PzuWzfK\n67cdzhEOC7ak3hj2A+B+WAEVA3upwb9IluPK44jLKMkQLmY8AMtqrtJJciPN\nCBG0+Yu/4vvXEpOemz6XtDqjTSBVFsaFcQBmZsmLK4d5zfQlsXrnWNJDk3u9\nijH7KGAZD3UKZTgElp3ft7hPKY9je2Z3rSqAJ1Ec994sWQ3QmN9N4H3gJlTj\ni7O2hywomixamr0xAImiXeD+cK8agrkWfKDFrnvY7xLiC/vrUOJnnmKbrH+e\nXAqxumcHdIvSTt/n2h5r5cQ0DrmGckpmZQc6oqTrtwVP77LwKixNySs/x7Ju\nJLzn6JpKlqFY+WCHbH9YbC7hbs+CmoaRYjhpd8NX216TCUCl/xLc6nb2JMDc\nxWLXQE1slQNksyXx33ixjw3iMtEUsuI1AiyHTMu+YIxN7G7MsSuPHHVWC1iL\nm8grwRFnzvGcll4pcM8uOA6Ij3JIglZHn5L8Fh5uUGPWU8VXtwEiklJqQf8J\nGmvW\r\n=uiEg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNnNiunEy+hr8Ad0svcF7GKOl1VfqM8d8yZWXQCc9t6QIhALfVEEp72tHfa7U138DnYonPdqQ6j8KkeIiIhbnMhp3K"}]},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"_npmUser":{"name":"ksmithut","email":"npm@ksmithut.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mongoose-role_3.0.2_1559791798535_0.20391178453863956"},"_hasShrinkwrap":false},"3.0.3":{"name":"mongoose-role","version":"3.0.3","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"pretest":"npm run lint","test":"istanbul cover _mocha","posttest":"istanbul check-coverage --statements 100 --lines 100 --branches 100 --functions 100","lint":"standard","codeclimate":"cat ./coverage/lcov.info | codeclimate-test-reporter"},"repository":{"type":"git","url":"https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","eslintConfig":{"root":true,"extends":["standard"]},"devDependencies":{"chai":"^4.2.0","codeclimate-test-reporter":"^0.5.1","istanbul":"^0.4.5","mocha":"^6.1.4","mocha-lcov-reporter":"^1.3.0","mongoose":"^5.6.4","standard":"^13.0.1"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2014 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"mongoose-role@3.0.3","dist":{"shasum":"191817ff21a34adb56b89b9b2c49bdc1fc4f3278","integrity":"sha512-gvYrwCtw7COiWH/nmCffKfM+SJ5kVAoo9KRa1igy3b7IdzFzHGTwaMWHW6HTCfWwf1cD4BAYDIpkmUYe0qe2hg==","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-3.0.3.tgz","fileCount":6,"unpackedSize":132376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKfiaCRA9TVsSAnZWagAAQlEP/1PjvQ+1/v35UjHGE98q\nVfLuC9btgwi94Z7NxBdhwBudhbjtyYv24zLO7bZQl4Q+vJukDP4LJiUka+kz\nrCc1QgY3mMI/cgLrjVYFtg4j1rLiC3opgJcMCPXiQlOUSSIvUJ2vlQH0Uh9r\nY44636VV7LlMGT8pQlZtExC4wGnBvolicozhb6WtNpUDXpjk/OHbn91zj4R7\nIU0X6pXI/QFoKEfhlu/zx4ZKK9rAJge5Uy3KaDtCbtubzxDaA9hTr67keBOn\n4P4yob/Mlffp4s4noJ/tZ215ycimgDUFVOroRO1MpWyjjCWKLoky9AkcLURV\nCtZN9Rv2CKIYpZHvGmAtBUmkUZdj/Hj5NbAU1E8fhWVJWfzUzeP1h6+W1Y1B\nPua65b3sb+jkwJL1Svw6W2VctKQpj2VQanNb6hXhZ38Ke0Ciz6yEJWFyLsqz\nJ/wDAywU+CF/JFF3bnQ7qF6pQdbFrCqSnlEpqFfw4LeHkEaUtRW9pfgrj2Vg\nLJrIAmM3W4yJrH9zVFqkfiK+e8uYdeA9LbkpLVgXqKgC6p5zOTYBq49qUYav\nh+KHtk1gyBZPbupOjHs/2oKbcJu3ES0VXWT5gqsts6pQo3DGtlOAEASIkRkJ\nE0wumDy1UC22pUVMOO2VK2H69dL99rNg7yz0hsPnEq7jAoDK8PHtnvJwvN/7\nAy6e\r\n=0AKb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/lpeoh3A90H3lmYOis4owE4z+lQij/+AV/TMg2pcGfAIhAOEqAvAWXicgILDrQMAvJmuRsfPI9O7LRuuIDG37sPRc"}]},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"_npmUser":{"name":"ksmithut","email":"npm@ksmithut.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mongoose-role_3.0.3_1563031705984_0.47934244939165693"},"_hasShrinkwrap":false},"3.0.4":{"name":"mongoose-role","version":"3.0.4","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"pretest":"npm run lint","test":"istanbul cover _mocha","posttest":"istanbul check-coverage --statements 100 --lines 100 --branches 100 --functions 100","lint":"standard","codeclimate":"cat ./coverage/lcov.info | codeclimate-test-reporter"},"repository":{"type":"git","url":"https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","eslintConfig":{"root":true,"extends":["standard"]},"devDependencies":{"chai":"^4.2.0","codeclimate-test-reporter":"^0.5.1","istanbul":"^0.4.5","mocha":"^6.2.0","mocha-lcov-reporter":"^1.3.0","mongoose":"^5.6.11","standard":"^14.0.2"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2014 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"mongoose-role@3.0.4","dist":{"shasum":"3aef62f4c9736bb2525f8f7849d732be0bd94edc","integrity":"sha512-zt3x5xNyUg2HUvieF1VW+CglaOEnzgt0Wp7JKfLbGCD3lfEKE7s2qluYgxgOmS0eV0kRslzl3uQES7V0nduvNA==","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-3.0.4.tgz","fileCount":6,"unpackedSize":137770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZULECRA9TVsSAnZWagAA4fkP/Axpg9frSpILau1Kae4c\nziHNH764l8rhUi7k7/qt8fQMVyC2r8U8jixxkFj5mlldUMEwal+eI0r4EWlf\ncKzJ0Eh2MpiyHsrXDmHyKPiYs600yRJjUGCLxJCe901ULJsziExRMU74n14l\nAP0WY8AVHuW0uY5lfApjAOa5AliaupbHtHFBv/zfYpO9tM+6PpVqlHta+DjU\n19DWC59VBSJCZp3Ov/YpeUwjdeOHCSMWA1xxu3FHhFZe9pgZ9/jWRmYJ9vnW\n/FaNkxaWgzjjrirOvQnclEtS7cNIbC74kSXvkXIXe9f6uT/wddUKkWwzkFNf\nMmmdYa1tYdGgZSixQGo+dkBGN8OkpE643YMRX/PGIclBB/GDQVhKu9TH7VtI\nuP634owFo6xDY3BuJX4QoEdkDUiFsOGZ9+EvYHoycrtiVaJz0GUgLyOCzfcq\nzv/6A0y/xA2iOMjyWtxUotnfQ+l0o9Rwo1kc5Ni92GGgHYvMWb5/d7A846cb\njsvRzSRKUEYxSKeepZw994vEDkr8JxGg3po7n0jlv5oxgvtbiwr++GKmW2zM\n77MHT8hjdCt9Crp7RfPo8IcCFop2DLpvileKoCz64+oJAV6k2I1PtkkRBkOL\n7XCUQBKCkaVnzX3z3Sht8w3bOIrAQW8dK5+pab+WKMCeSEb4B+BA/TIIqdsr\nh9nF\r\n=3T1m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFbtgbRRPcbSRNtqahRHWcPOlZoH4I9cWJHOK+tb1PpsAiEA0rNWiLucphzU6QuMufKp/z7LKYcHCE8mav9NgrG7Zt0="}]},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"_npmUser":{"name":"ksmithut","email":"npm@ksmithut.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mongoose-role_3.0.4_1566917315888_0.39429249026041857"},"_hasShrinkwrap":false},"3.0.5":{"name":"mongoose-role","version":"3.0.5","description":"Adds a role and access level functionality to a model","main":"index.js","scripts":{"pretest":"npm run lint","test":"istanbul cover _mocha","posttest":"istanbul check-coverage --statements 100 --lines 100 --branches 100 --functions 100","lint":"standard","codeclimate":"cat ./coverage/lcov.info | codeclimate-test-reporter"},"repository":{"type":"git","url":"https://github.com/ksmithut/mongoose-role.git"},"keywords":["mongoose","role","account","acl"],"author":{"name":"ksmithut"},"license":"MIT","bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"homepage":"https://github.com/ksmithut/mongoose-role","eslintConfig":{"root":true,"extends":["standard"]},"devDependencies":{"chai":"^4.2.0","codeclimate-test-reporter":"^0.5.1","istanbul":"^0.4.5","mocha":"^6.2.2","mocha-lcov-reporter":"^1.3.0","mongoose":"^5.7.7","standard":"^14.3.1"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2014 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"mongoose-role@3.0.5","dist":{"shasum":"ddf25cbd10322e06f63eb550912171ce13f8358f","integrity":"sha512-maff0VlDVHJgYstd7bKJTCOpFaxlS7bA/C/QpB1xeiYyMOWMVlW2cnNLNnnJjZuBg/5knzgP2UoomLCsP2zV/g==","tarball":"https://registry.npmjs.org/mongoose-role/-/mongoose-role-3.0.5.tgz","fileCount":6,"unpackedSize":124856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvYo3CRA9TVsSAnZWagAAxDYP/i3a4CFIf7xwf5KlVyy2\ny7gEFbofwW2Fl2pz+CBDrEGfBlWYzR7QGdsJv8MfF219MZy51+9ID2z2zF6j\nPqtruZlLSx+A2Kg9E08qP6MXhQj2sFanYBaNzTHgjuzCOGO7McSi/g5EPTG4\nwtgZeugjykZ3UPdqHxDmnJmHm7icmLcqOpdZ7+TCDZPHyyLYAoy/DqI3z1nh\neTYRRzpdcbl9WvQIHPg+VF9AMGESeKzrDVaMXfnIjLCxwl5vLd2LFoAvtQYn\n7Zp7Hx6eMjGZ5W8XySfSqWDkt5X5SCC1yglVBAKP92pfT9mZ+qa9XWDgi63E\nVlxaPpMWdP8h9XyPFSmtHsYpafdpOv0LpUJeRi5viGTRjaU2dERDqHas3t9g\n/B10/9VJAseFgpVupklPxWM/xncoNTnZRbwoQUTIQOhwgO22vS4dl3yeRnoA\njmH5vXLn9ydzR5TluqzlvLqVEIoEk6CfPb55c4zYMSPqUFzk17AARzczQS5N\nG3bm2KGHsNeG78FVscll9kkIFqgzdYvgDF1JR/hikhmhJ2nCZjvR0YPSK7gk\nK2BKzkJZ6EA/HUXUt4jO3KichO7CLxDzYEkxmBgUru/Oc5t/qOcyvjl+iJ4A\nwFYgq/rp+srE83wPUIzhHFVeHavgc0IoMxiY5SPw/DkQczuUcomBsNTdksb/\nSUN4\r\n=EKGG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFo1s1EJLruNnVw1DI1eTnrStAYMcMJvb5kOcmNmsdQSAiEA51d1WjTkB7XKVsMllKntfIjuWkKpEP9X+IMeQulSOb8="}]},"maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"_npmUser":{"name":"ksmithut","email":"npm@ksmithut.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mongoose-role_3.0.5_1572702775204_0.03848331158252094"},"_hasShrinkwrap":false}},"readme":"# mongoose-role\n\n[![NPM version](http://img.shields.io/npm/v/mongoose-role.svg?style=flat)](https://www.npmjs.org/package/mongoose-role)\n[![Dependency Status](http://img.shields.io/david/ksmithut/mongoose-role.svg?style=flat)](https://gemnasium.com/ksmithut/mongoose-role)\n[![Dependency Status](http://img.shields.io/david/dev/ksmithut/mongoose-role.svg?style=flat)](https://gemnasium.com/ksmithut/mongoose-role)\n[![Code Climate](http://img.shields.io/codeclimate/github/ksmithut/mongoose-role.svg?style=flat)](https://codeclimate.com/github/ksmithut/mongoose-role)\n[![Build Status](http://img.shields.io/travis/ksmithut/mongoose-role.svg?style=flat)](https://travis-ci.org/ksmithut/mongoose-role)\n[![Coverage Status](http://img.shields.io/codeclimate/coverage/github/ksmithut/mongoose-role.svg?style=flat)](https://codeclimate.com/github/ksmithut/mongoose-role)\n\nA mongoose plugin to help manage user roles and user access levels.\n\n**Looking for another maintainer. I have been cleaning up my packages and no\nlonger have the energy to maintain this package. If you are interested in\ntaking over, please reach out. Otherwise, eventually I will have this package\nremoved. I doubt this module is used enough for people to read this, but in\ncase it is read, there's your notice.**\n\nThere are many ways to handle user account access levels. This one has a very\nspecific methodology.\n\n- A Model has a **single** role, and it is required.\n- You can add as many roles as you want.\n- An access level has many roles.\n- Access levels are used to make sure a user has access to a given\n  functionality.\n\nI've thought about adding the ability to have multiple roles and add methods to\ncheck if a user has any of the given roles and all of the given roles. The\nsingle role and setting access levels suits my personal needs, but if you find\nit would be useful to have this functionality, sound off in issues and pull\nrequests.\n\n## Installation\n\n```bash\nnpm install --save mongoose-role\n```\n\n## Usage\n\n```javascript\n'use strict'\n\nvar UserSchema = new require('mongoose').Schema({\n  email: String\n})\n\nUserSchema.plugin(require('mongoose-role'), {\n  roles: ['public', 'user', 'admin'],\n  accessLevels: {\n    public: ['public', 'user', 'admin'],\n    anon: ['public'],\n    user: ['user', 'admin'],\n    admin: ['admin']\n  }\n})\n\nvar User = mongoose.model('User', UserSchema)\n\nvar newUser = new User({ email: 'email@email.com', role: 'user' })\n\n// The string passed in is an access level\nconsole.log(newUser.hasAccess('public')) // true\nconsole.log(newUser.hasAccess('anon')) // false\nconsole.log(newUser.hasAccess('user')) // true\nconsole.log(newUser.hasAccess('admin')) // false\nconsole.log(newUser.hasAccess(['public', 'user'])) // true\nconsole.log(newUser.hasAccess(['public', 'anon'])) // false (because the user isn't a part of 'anon' access level)\n```\n\nIt it required that you pass in options to the plugin. This way you can set up\nthe roles and access levels. As mentioned, users must have one of the roles\npassed into the `roles` option. The `accessLevels` are an easy way to configure\nwhich types of users will have access to certain functionality of your app.\n\nFor example, you could create an express middleware that verifies a user's\npermissions before they can access an API endpoint.\n\n```javascript\nfunction hasAccess(accessLevel) {\n  return function(req, res, next) {\n    if (req.session.user && req.session.user.hasAccess(accessLevel)) {\n      return next()\n    }\n    return res.json({\n      success: false,\n      error: 'Unauthorized'\n    })\n  }\n}\n\nvar router = require('express').Router()\n\nrouter.get('/some-protected-route', [\n  hasAccess('user'), // protection middleware\n  function(req, res, next) {\n    console.log('you have access!')\n    res.json({\n      secure: true,\n      data: 'super secret data'\n    })\n  }\n])\n```\n\nThis plugin adds a `role` String field to a schema. It's set as an enum with the\ngiven `roles` values in the options. It is required, but I may be convinced to\nmake that optional and set a default value or something.\n\nIt also adds a `hasAccess()` method to the model instances. It takes in a\nstring of one of the accessLevels you defined in the options. If nothing is\npassed in, it will return false. Note that in v1, it used to return true. It was\ndecided that passing in nothing was usually a case of not handling some edge\ndata cases, such as looking up valid roles for an endpoint from a database. If a\nstring is passed that isn't one of the access levels, it will return false.\n\n## Options\n\n- `roles` (Array of Strings) - The string representation of the user roles.\n  Default: `[]`\n- `accessLevels` (Object) - An Object hash that has access levels as the\n  property keys, and arrays of strings as the roles that have that access level.\n  Default: `{}`\n- `rolePath` (String) - The path that the role property will be saved to the\n  model instance. Default: `'role'`\n- `rolesStaticPath` (String) - The path to the exposed roles given in the\n  options. Default: `'roles'`\n- `accessLevelsStaticPath` (String) - The path to the exposed access levels\n  given in the options. Default: `'accessLevels'`\n- `hasAccessMethod` (String) - The instance method name to be used to check a\n  user's access level. Default: `'hasAccess'`\n\n# Changelog\n\n## 3.0.0\n\nUpdates dependencies, removes support for node '4' (because peerDependencies\ndropped support).\n\n## 2.0.0\n\n`hasAccess()` when no access levels are passed in returns `false` instead of\n`true`.\n","maintainers":[{"name":"ksmithut","email":"ksmith.ut@gmail.com"}],"time":{"modified":"2022-06-20T07:43:49.303Z","created":"2014-09-19T13:55:51.089Z","1.0.0":"2014-09-19T13:55:51.089Z","1.0.1":"2014-09-22T20:35:09.011Z","1.1.0":"2014-09-22T22:04:57.644Z","1.1.1":"2014-12-12T15:37:16.631Z","1.1.2":"2015-02-07T21:06:02.329Z","1.2.0":"2016-01-22T16:44:15.598Z","2.0.0":"2016-09-13T14:21:47.758Z","2.0.1":"2017-06-01T21:08:28.219Z","3.0.0":"2019-01-14T15:21:34.412Z","3.0.2":"2019-06-06T03:29:58.654Z","3.0.3":"2019-07-13T15:28:26.126Z","3.0.4":"2019-08-27T14:48:36.140Z","3.0.5":"2019-11-02T13:52:55.286Z"},"homepage":"https://github.com/ksmithut/mongoose-role","keywords":["mongoose","role","account","acl"],"repository":{"type":"git","url":"https://github.com/ksmithut/mongoose-role.git"},"author":{"name":"ksmithut"},"bugs":{"url":"https://github.com/ksmithut/mongoose-role/issues"},"license":"MIT","readmeFilename":"README.md","users":{"vekat":true,"codevelopit":true,"lonjoy":true,"lindhard":true,"dookdik":true,"delacap":true,"rafarocha91":true}}