{"_id":"seneca-perm","_rev":"37-7823576672c330e4b7154826e765781b","name":"seneca-perm","description":"Seneca permissions plugin","dist-tags":{"latest":"0.5.6"},"versions":{"0.1.0":{"name":"seneca-perm","version":"0.1.0","description":"Seneca permissions plugin","main":"lib/perm.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","dependencies":{"underscore":"~1.4.4"},"devDependencies":{"gex":"~0.0.3","chai":"~1.5.0","async":"~0.2.5","seneca":"~0.5.6","connect":"~2.7.4"},"files":["README.md","LICENSE.txt","lib/perm.js"],"_id":"seneca-perm@0.1.0","dist":{"shasum":"16d0017e6989f721a576d8e40d32c5e00e6e04e4","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.1.0.tgz","integrity":"sha512-T936SkAfeboQmrDLgO2oEdEeneE8lOGc4Z38SKL8MUDLPXctvNRZX+tOJ8R5lf5BiCsgku2TN6RpAI0v4VZVNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjAO5JVhBhPJ+l3htgFT2sJOC8xpYm0UdxbWsOnt1BygIhAK4vsZNcqH+nTuW3B1DnX2Y2VSV+ES5ournMZp4/Cx8d"}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"rjrodger","email":"richard.rodger@nearform.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"}],"directories":{}},"0.1.1":{"name":"seneca-perm","version":"0.1.1","description":"Seneca permissions plugin","main":"lib/perm.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","dependencies":{"underscore":"~1.4.4"},"devDependencies":{"gex":"~0.0.3","chai":"~1.5.0","async":"~0.2.5","seneca":">=0.5.9","connect":"~2.7.4"},"files":["README.md","LICENSE.txt","lib/perm.js"],"_id":"seneca-perm@0.1.1","dist":{"shasum":"232ac6e75b98050d92d9ec1ebc6bd775aa99dc59","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.1.1.tgz","integrity":"sha512-Z+0jTntM7SWeTk8QSTr4KiL82aSZpML3uigVgCSyVJhYjO3T9c9944hXv4muju2RBqugkcGq6kBK40G5fcswEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcqRLkEjMupL9ypRGZob4q0oyco86xo9cl2/ShHwzC3wIgXR1QvezZFmKkzmV4bZznet6NdTOAGuc5ikbUjJjkn7E="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"rjrodger","email":"richard.rodger@nearform.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"}],"directories":{}},"0.1.2":{"name":"seneca-perm","version":"0.1.2","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/perm.test.js"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"0.5.x","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"underscore":"1.5.x"},"peerDependencies":{"seneca":"*"},"files":["README.md","LICENSE.txt","perm.js"],"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.1.2","dist":{"shasum":"51d58a4a28d16c9ceacc7145158d916fa886a236","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.1.2.tgz","integrity":"sha512-hZhtZGK5uIKSgwXayA4LIwWUjEQKNdvuaUEguyvo6NIyP9K+bJqqm9uCD8CyAkoJkSPYUqMizr2bOPE5wYVPDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBbGe251OeK5ddL/lwQzud5kDdCJ/pKl7eACFfEa8XoDAiA3+Ac+VugjnM8NsQmD3FbIA71y9ZS6tZAqTM1f83J96Q=="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"rjrodger","email":"richard.rodger@nearform.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"}]},"0.1.10":{"name":"seneca-perm","version":"0.1.10","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"0.5.17","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"lodash":"2.4.1","access-controls":"0.3.x"},"peerDependencies":{"seneca":"*"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.1.10","_shasum":"c6ba3d6c94881439d5ff6db0b6a0af638fce0b39","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"c6ba3d6c94881439d5ff6db0b6a0af638fce0b39","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.1.10.tgz","integrity":"sha512-I2/KtLlvKFX31Mng2Z9du9DHzxjhP3v1p83cyV/4lR4hDPs78LMTWdi3EbQ/i3fTs3jGCWP3YyMtq5e0Mc6UcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZam5CmnONjVk4gI9LfcD3CoTk3gSYhGmnKHzA3CNj3AiEA/dU2cUa3npChUPVQ12nK5e5GGRK0jMJG7wv9QJoAqNk="}]}},"0.1.11":{"name":"seneca-perm","version":"0.1.11","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"0.5.17","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"0.4.1","lodash":"2.4.1"},"peerDependencies":{"seneca":"*"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.1.11","_shasum":"f3e93f35d49fe3441b7a80622fa57781d878ea13","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"f3e93f35d49fe3441b7a80622fa57781d878ea13","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.1.11.tgz","integrity":"sha512-RFILMQTIVJm5vZxmFBlzddNgpkvHFXP22EPveY5I9e9M65wNs7+GCv3t0JOMdTyyIDYhpngC025SNRb+u6CXbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICSjGv+sXW8xNACT3ucp8Vhf8Ig3HJBizH/mNSnAJdQXAiEA/qKFCkSzC0mMkggTabtjrhpFJ/3MZseO3qTmgJPdX5M="}]}},"0.1.12":{"name":"seneca-perm","version":"0.1.12","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"0.5.17","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"0.4.2","lodash":"2.4.1"},"peerDependencies":{"seneca":"*"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.1.12","_shasum":"d98cf84356c2289c6e029de63d2719b4627b3cff","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"d98cf84356c2289c6e029de63d2719b4627b3cff","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.1.12.tgz","integrity":"sha512-fsMAnI0pHML4fAEnPsE4t3suQrd6mSax1dUoBFEZQzYwmtJ/gRb0vVMUmrl+N9jAgVZKoRBOwhIx9CpqZfxtXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC1VcJdESd5ghFNC5a7yqWGoOj3yoRI70WXGUkMb0nN4AiAH9BY2BGIydtVJLjSmk63fIc9mL4BvITlr1Ln+GOOtpQ=="}]}},"0.1.13":{"name":"seneca-perm","version":"0.1.13","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"0.5.17","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"0.4.2","lodash":"2.4.1"},"peerDependencies":{"seneca":"*"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.1.13","_shasum":"14c335f7dc94fa8cb762c402d9bdbec615025103","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"14c335f7dc94fa8cb762c402d9bdbec615025103","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.1.13.tgz","integrity":"sha512-2xu4/EsSJf6xnDDVxim+4gjsoXSzyLxSArBtfF7TezTeyIOUt4kIutbUB881aqe5B3+gAAV7CtWMIkJvXpUDrQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBQpo09zdxQkLzeE9PjNZ5VX2Pp/w5Gc5ZMZnjfk/N6LAiBFOvuPhr08kKqiyHNIKk0ER3a46f3lxNEV1HIHFW999Q=="}]}},"0.2.0":{"name":"seneca-perm","version":"0.2.0","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"0.5.17","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"0.5.0","lodash":"2.4.1"},"peerDependencies":{"seneca":"*"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.2.0","_shasum":"53b1eb338f5bb562a8cd3ef1bc0beeafaa209887","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"53b1eb338f5bb562a8cd3ef1bc0beeafaa209887","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.2.0.tgz","integrity":"sha512-wIkMtawnAGPcYvufze6V7yD8KtNQ2zLC2JvY7Mf6NYbjPT2u5qJ/xqbozSRklCsTZfoArjacGYLz2mhDgZNqNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeXId4NoM8BsirNz42x+NRL+9DpWDnjQlhgm4cptMqrgIhAIHnCJClwbPbiBq04BAKLZdFM7jiLmfOUrW9m/Socy+A"}]}},"0.2.1":{"name":"seneca-perm","version":"0.2.1","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"0.5.17","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"0.5.2","lodash":"2.4.1"},"peerDependencies":{"seneca":"*"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.2.1","_shasum":"64da8afdb1f9941f884270a66b853377d6e394b8","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"64da8afdb1f9941f884270a66b853377d6e394b8","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.2.1.tgz","integrity":"sha512-CJ1G6V3gHLBNEyg43wRvsjwPaWflrxvtxswVWsoTaG7u3Pls30VYBEtwPIhDrq1ZRhg4ZdBWAGQRwncNZCTH1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqUrnCBEnsaOcVR7FaWbD3gLpN6xGk0KkVCaSYusawtQIhAOAJ1f2P00aP06ifMmtB6M20nHFTD101VD99EvoBag34"}]}},"0.2.2":{"name":"seneca-perm","version":"0.2.2","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"0.5.17","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"0.5.2","lodash":"2.4.1"},"peerDependencies":{"seneca":"*"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.2.2","_shasum":"cca03fb6c7843769bc0b7b192f43e4ea231bf079","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"cca03fb6c7843769bc0b7b192f43e4ea231bf079","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.2.2.tgz","integrity":"sha512-P1t3p5hAiJCRi437mlgpCPuuuWqC7AHaATqrfla9rvjzPyUGt+vbuXZ9jfHoU78h8vuc6XHNO072NtgiEtHyeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEFF1UfXPF0K9NFNK5Gda4mEbTzsGjqUXFRK3BjMcqwmAiEAnQw7KGNDiMKy3snv8bg/iLJ0fJE10G8qhkgeMZYHWDw="}]}},"0.3.0":{"name":"seneca-perm","version":"0.3.0","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"0.5.17","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"0.5.2","lodash":"2.4.1"},"peerDependencies":{"seneca":"*"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.3.0","_shasum":"70db09bfd7f48710079a1e371ae9c2e3b17edd74","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"70db09bfd7f48710079a1e371ae9c2e3b17edd74","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.3.0.tgz","integrity":"sha512-RzOw7P5nTjGMQPgTeb38xVnpof0cZd+6HZrxJ2JIpoZ948/yRca0LCkCzlQBoOvMgf1H8bGhYaM9OUmqjZ42gw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6gNJv29wnARYEkQSGrv5CxG+cirXx/wIXSwjSGUzp3QIhALON7sPj7AhI7gGye6zprQUoDKUwXJq5xzXTWuWLW8Kp"}]}},"0.4.0":{"name":"seneca-perm","version":"0.4.0","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"plugin","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"~0.5.2","lodash":"~2.4.1"},"gitHead":"f127e8004d77b3badfcd06efea66d35c25ec18a0","bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.4.0","_shasum":"f6df8d357bca71c77ff88895c10fedbc437aae6f","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"rjrodger","email":"richard.rodger@nearform.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"f6df8d357bca71c77ff88895c10fedbc437aae6f","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.4.0.tgz","integrity":"sha512-HcfwWWRG+/nZkBGyWDaagIBYjNNG/eSDFQiBcQo7DNAnfsHCUVTafciAoMxi8Im/H3U3YExAbcY3MTF/OcUm7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmGpHsFfCdiabto7gNGtS3jpfv+d6Hc80Qr6GtsmMZfgIhAKYmddiLDtuibOTtBeEWECThN+U3qS80Y2ZT36BSTFrr"}]}},"0.5.0":{"name":"seneca-perm","version":"0.5.0","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"plugin","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"~0.5.2","lodash":"~2.4.1"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.5.0","_shasum":"90efcdbccd01de12132c6292ddcc851373ea67f2","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"90efcdbccd01de12132c6292ddcc851373ea67f2","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.5.0.tgz","integrity":"sha512-FSOCUzTObGNK0QgUUTCfoobwKxFZnAcseVRfSwKyZn/1rieUMk20/x3aTn3Hjuz42fWpNAJseIKvmtMaXNf0GQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7IftoOUjwrW2EPtOCF8vVLr0+TbB4RLfSAnhgqDGVugIhAIUE1hZggUKBRfUZcm5DeFulGks3Vxj3fxojDeficQgY"}]}},"0.5.1":{"name":"seneca-perm","version":"0.5.1","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"plugin","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"~0.5.2","lodash":"~2.4.1"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.5.1","_shasum":"a8bd6ca13a10746fda25b26bdd16740657b73b73","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"a8bd6ca13a10746fda25b26bdd16740657b73b73","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.5.1.tgz","integrity":"sha512-I7CeKRGiac0/9ge9zAsvf+Wz51vxljyLWzg6aPgYDVomgFR1au3p9bLLbzTo8QEd9T2Pukm77C8UJZYgLavYVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtqYJS7JlzEgaE63rHejVpFIg2GlOQT4ArNve4dBKBYAIhAML8bixIbE6zKfqqUh4GZuTY7UxSGWTx0bpD4TWzEI1M"}]}},"0.5.2":{"name":"seneca-perm","version":"0.5.2","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"plugin","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"~0.5.2","lodash":"~2.4.1"},"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.5.2","_shasum":"87634638a8aceacf13789784384c2b607a7bdf18","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"nherment","email":"nherment@gmail.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"}],"dist":{"shasum":"87634638a8aceacf13789784384c2b607a7bdf18","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.5.2.tgz","integrity":"sha512-i0WH8J4NrXfJTIwL0fnasiW/6tQdjQlS+7ZJOjhC9kO8iZtSqcZqEE0yZivZ0nRZ0eP8ctUb/jM30gO/WhkkKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPEi7LlNSy79DbMpdJ9iJFHzP9ofCzZ5AaU4UpKpgFfgIgT0GoRXnW5kMJkS6/XWiZ28M8WKmbkE4BHpcAtH26lmQ="}]}},"0.5.3":{"name":"seneca-perm","version":"0.5.3","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"plugin","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"~0.5.3","lodash":"~2.4.1"},"gitHead":"0ca869e577707e9647c755765c4f2e20cfac9295","bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm","_id":"seneca-perm@0.5.3","_shasum":"86e7d5dab4ae685a45d32bf42eacb4070ac1b5ce","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"iantocristian","email":"iantocristian@yahoo.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"},{"name":"soldair","email":"soldair@gmail.com"},{"name":"iantocristian","email":"iantocristian@yahoo.com"}],"dist":{"shasum":"86e7d5dab4ae685a45d32bf42eacb4070ac1b5ce","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.5.3.tgz","integrity":"sha512-Xq5k6bCgkxRckI1691Q1TuPz9nMLA7ykykfynESjGY3yDPitp+paRgvKUt+6OpqYhZBNAoIGLaQcK8V76iQcsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICdIZw0owYiQe0Gc0I4WZBI0nXYRVQGzyiV6GejBAOBuAiEAvUeppdhydX8uAywWrTXUwm+SjILbiBCmjMNkNF26s5c="}]}},"0.5.4":{"name":"seneca-perm","version":"0.5.4","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"plugin","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"~0.5.4","lodash":"~2.4.1"},"gitHead":"d7c6957c7f9eecdfadf56acc0899edc0c7a0c833","bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm#readme","_id":"seneca-perm@0.5.4","_shasum":"961516bf4c0d68a0a58943189531c26751e25eac","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.10.38","_npmUser":{"name":"iantocristian","email":"iantocristian@yahoo.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"},{"name":"soldair","email":"soldair@gmail.com"},{"name":"iantocristian","email":"iantocristian@yahoo.com"}],"dist":{"shasum":"961516bf4c0d68a0a58943189531c26751e25eac","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.5.4.tgz","integrity":"sha512-Hb3iZctMydBpREx07bwmrKF73YjZedp9zYfe/G5UEoHUVSendEFEDRW/FiwG+cysNWuJOsFjF8dyp6XJwSTYYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGl/l6LeyLLk/fcJdS0071FaDzOjcVZQIXQTC31SEay9AiEArSJCIj0KQKGAOVLnzva17R/vIjHo2RXID1vBWj7amUQ="}]}},"0.5.5":{"name":"seneca-perm","version":"0.5.5","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"plugin","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"~0.5.5","lodash":"~2.4.1"},"gitHead":"2288bd7406a952f9bdba6ae47d524bf9fb593fda","bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm#readme","_id":"seneca-perm@0.5.5","_shasum":"2925edac887b87e822ad96b0d415dbec382a85e4","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.10.38","_npmUser":{"name":"iantocristian","email":"iantocristian@yahoo.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"},{"name":"soldair","email":"soldair@gmail.com"},{"name":"iantocristian","email":"iantocristian@yahoo.com"}],"dist":{"shasum":"2925edac887b87e822ad96b0d415dbec382a85e4","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.5.5.tgz","integrity":"sha512-Z23aRtyl2JobhVWlHVF6E/YyOnnzNgWCr+f3K1Zi0ZqteC2j0BUDdOhwtCng0BVyPBB6fUjLTgpnbcwmAYiXUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGMMltkybhSRLxF/p2NN7XAo1i6iGBhQPUlhj8WKJXBbAiEA1jEmsohKzE29fIRVdTlEy3QqCIjdw8o3sB1uyWdVxdM="}]}},"0.5.6":{"name":"seneca-perm","version":"0.5.6","description":"Seneca permissions plugin","main":"perm.js","scripts":{"test":"./node_modules/mocha/bin/mocha test/*.test.js --reporter spec"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"keywords":["seneca","perm","permissions","plugin"],"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"license":"MIT","devDependencies":{"seneca":"plugin","connect":"2.12.x","mocha":"1.17.x","gex":"0.1.x","async":"0.2.x","chai":"1.8.x"},"dependencies":{"access-controls":"~0.5.6","lodash":"~2.4.1"},"gitHead":"f36261ebbe4e93a95a8f6ce9675d835f23960b36","bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"homepage":"https://github.com/rjrodger/seneca-perm#readme","_id":"seneca-perm@0.5.6","_shasum":"0eb56062dbb56bf406b230671e773db95f642e9c","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.10.38","_npmUser":{"name":"iantocristian","email":"iantocristian@yahoo.com"},"maintainers":[{"name":"rjrodger","email":"richard.rodger@nearform.com"},{"name":"nherment","email":"nherment@gmail.com"},{"name":"soldair","email":"soldair@gmail.com"},{"name":"iantocristian","email":"iantocristian@yahoo.com"}],"dist":{"shasum":"0eb56062dbb56bf406b230671e773db95f642e9c","tarball":"https://registry.npmjs.org/seneca-perm/-/seneca-perm-0.5.6.tgz","integrity":"sha512-kph0g/UKepcyu0XNRDc9McDWg+cvTL5G1Vg34QaE+3qVGbWGRN+HuYbiiQwVKaXundB89OrFnlboiEzrvwpptw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYYffqnZA5kD8VHzHWiDGK9FHPfOBkpKFJBTPpPMc6HQIhAKWfW7hMof6I2oXahg4YzhmoriFRA4PoBKlR9iGefxCG"}]}}},"readme":"[![Build Status](https://api.travis-ci.org/rjrodger/seneca-perm.png?branch=master)](https://travis-ci.org/rjrodger/seneca-perm)\n\n# seneca-perm\n\n### Node.js Seneca permissions module\n\nThis module is a plugin for the Seneca framework. It provides a\npermissions system for actions. It's also a good example of how you can compose actions by layering plugins onto each other.\n\nThis plugin works by wrapping existing actions with a permission checking action. If the permission test passes, the parent\naction can proceed. If not, a permission error is generated.\n\nThe possible permission checks are:\n\n   * _allow_: simple yes/no\n   * _act_: allow only specific actions to pass\n   * _entity_: allow only specific actions on entities\n   * _own_: allow on specific actions on entities that are 'owned' by given users\n\nThis plugin also understands when it is used in a web server context, and will add a permission specification to\nthe req.seneca object if it exists.\n\nA full example, in the context of the seneca data editor, is provided\nin the [seneca examples repository](https://github.com/rjrodger/seneca-examples). TODO!\n\n\n### Support\n\nIf you're using this module, feel free to contact me on twitter if you\nhave any questions! :) [@rjrodger](http://twitter.com/rjrodger)\n\nCurrent Version: 0.4.0\n\nTested on: Node 0.10.36, Seneca 0.6.1\n\n\n### Quick example\n\nYou use this plugin mainly by adding a _perm_ object to user entities:\n\n```JavaScript\nvar userent = seneca.make('sys','user')\n\nuserent.find({email:'alice@example.com'}, function(err,alice){\n  alice.perm = {\n    act:[\n      {foo:'bar', perm$:true},\n      {qaz:'lol', perm$:false},\n    ]\n  }\n  alice.save$()\n})\n```\n\nThis permission specification allows the user alice to execute _foo:bar_ actions, but not _qaz:lol_ ones.\nThe _perm$_ metadata property specifies the permissions for each action pattern in the list.\n\nHere's another example, this time for entities:\n\n```JavaScript\nvar userent = seneca.make('sys','user')\n\nuserent.find({email:'alice@example.com'}, function(err,alice){\n  alice.perm = {\n    entity:[\n      {base:'shop', name:'cart', perm$:'r'},\n      {base:'qaz', perm$:'crudq'},\n    ]\n  }\n  alice.save$()\n})\n```\n\nIn this case, alice can only read ('r') from -/shop/cart entities, but can do anything to -/qaz/- entities.\nThere are more details on the [seneca data entity model](http://senecajs.org/data-entities.html) here.\n\nOf course, this example code does not actually work, as all of the setup and configuration is missing.\nHere is some working code that provides a minimal example by setting up some of the values manually.\n\n### Working Code\n\nThis code applies a permissions test to the _echo_ plugin. The _echo_\nplugin has one action _role:echo_, that just gives you back the same\narguments you put it. The example code adds a permission check to this\naction, and shows you how to trigger it manually, using the _perm$_ argument.\n\n\n```JavaScript\nvar seneca  = require('seneca')()\nseneca.use('echo')\n\nseneca.use( 'perm', {act:[\n  {role:'echo'},\n]})\n\nseneca.act({role:'perm', cmd:'init'})\n\nseneca.act({role:'echo', foo:'bar', perm$:{allow:true}},function(err,out){\n  console.log('foo='+out.foo)\n})\n\nseneca.act({role:'echo', foo:'bar', perm$:{allow:false}},function(err,out){\n  console.log(err)\n})\n```\n\n\nThe _perm$_ metadata argument is recognised by the _perm_ plugin and contains the permission specification to test against.\nNormally, you won't set this manually, but generate it using the _role:perm, cmd:makeperm_ action. In a web context, this\nplugin also does this for you, based on the perm property of the current user.\n\n\n### Web App Code\n\nHere's an outline of how you would use it in a\n[connect](http://www.senchalabs.org/connect) app, using the _user_ and\n_auth_ plugins to provide user accounts:\n\n```JavaScript\nvar seneca  = require('seneca')()\nvar connect = require('connect')\n\nseneca.use('user')\nseneca.use('auth')\n\nseneca.use('perm',{\n  act:[{role:'echo'}]\n})\n\nseneca.use('echo')\n\nseneca.act({role:'perm', cmd:'init'})\n\nvar app = connect()\napp.use( seneca.service() )\napp.listen(3000)\n```\n\nThe perm plugin does not wrap other actions immediately when it is registered. Rather, you call the _role:perm, cmd:init_ action\nwhen you're ready. First you need to add any other plugins and actions that you want to apply permissions checking to.\n\n\n\n## Install\n\n```sh\nnpm install seneca\nnpm install seneca-perm\n```\n\n\n## Usage\n\nThis plugin has two elements. First, the options define the set of actions that permission checks will apply to. Second, permission\nchecks only occur if there is a _perm$_ metadata argument, containing a permissions specification.\n\n### Permission options\n\n   * _act_: array of action pins (needed for both _allow_ and _act_ checks)\n   * _entity_: array of entity type specifications\n   * _own_: array of entity type specifications\n\nThese specify the actions to wrap. For example:\n\n```JavaScript\nseneca.use( 'perm', {act:[\n  {role:'echo'}\n]})\n```\n\nThis wraps any action with a _role:echo_ argument, which means that it will have a permission check applied.\n\n<b>You need to specify explicitly the actions to which you wish to apply permission checks.</b>\n\nAs a convenience, you can apply permission checks to entities by simply specifying their zone, base and name (all optional):\n\n```JavaScript\nseneca.use( 'perm', {entity:[\n  {base:'sys'},\n  {base:'foo',name:'bar'}\n]})\n```\n\nThe above code specifies that actions on any entity of type -/sys/- or -/foo/bar will have an permission check applied.\n\nThe _entity_ option saves you from having to specify a permission check for all the entity actions, otherwise you would have to do this:\n\n```JavaScript\nseneca.use( 'perm', {act:[\n  {role:'entity',cmd:'save',base:'sys'},\n  {role:'entity',cmd:'load',base:'sys'},\n  {role:'entity',cmd:'list',base:'sys'},\n  ...\n]})\n```\n\nThe allowed entity operations (create, read, update, delete, query)\nare specified in the perm$ metadata argument to the entity actions\n(see below).\n\nThe _own_ option works in much the same way as the _entity_ option,\nexcept that the user must be the owner of the entity in question.\nEntities should have an _owner_ property containing the identifier of the -/sys/user entity for this to work.\n\n```JavaScript\nseneca.use( 'perm', {own:[\n  {base:'foo'}\n]})\n```\n\n\n### Permission specifications\n\nTo trigger a permissions check, an action must contain a perm$ metadata argument. This is an object that contains one or more of the\nfollowing properties:\n\n   * allow: boolean, true if action is permitted.\n   * act: an action router object; only matching actions can be executed\n   * entity: an entity type router object, matching the entity action, and specifying the operations permitted\n   * own: an entity type router object, matching the entity action, and specifying the operations permitted, if also owner of the entity\n\nYou do not normally construct the perm$ object directly, but instead use the _role:perm, cmd:makeperm_ action to create one from a\nliteral definition (you can store this in the -/sys/user entity, for example). If you store the definition in a _perm_ property on\n-/sys/user, and use the perm plugin in a web context, then this is done for you automatically.\n\n\n#### allow\n\nTo store as a literal, use this structure in the _perm_ property:\n\n```JavaScript\n{allow:true|false}\n```\n\nThis will converted to the perm$ metadata argument, by the _role:perm, cmd:makeperm_ action:\n\n```JavaScript\n{allow:true|false}\n```\n\nIn general, this check is not particularly useful for individual\nusers, serving rather to provide a global block on certain\nactions. You would do this by adding an allow property to any _perm$_\nyou generate.\n\n\n#### act\n\nTo store as a literal, use this structure in the _perm_ property:\n\n```JavaScript\n{act:[\n  { role:'...', cmd:'...', perm$:true },\n  { role:'...', perm$:false },\n  { foo:'bar', perm$:true },\n  ...\n]}\n```\n\nThe _act_ sub property is an array of action pins. Each pin specifies\nthe argument properties to match against. The perm$ value indicates if\nthe action is allowed or not.\n\nThis will converted to the perm$ metadata argument:\n\n```JavaScript\n{act:router}\n```\n\nwhere _router_ is a [seneca router](http://senecajs.org/routing.html) TODO! (the same thing that routes action arguments to plugin functions).\nThe router matches a given set of action arguments to the permission specification.\n\nYou could construct it manually, like so:\n\n```JavaScript\nvar router = seneca.util.router()\nrouter.add( {role:'...',cmd:'...'}, true )\nrouter.add( {role:'...'}, false )\nrouter.add( {foo:'bar'}, true )\n```\n\nNote that as with all routers, the action arguments are matched in alphabetical order.\n\n\n#### entity\n\nTo store as a literal, use this structure in the _perm_ property:\n\n```JavaScript\n{act:[\n  { base:'sys', perm$:'' },\n  { base:'foo', perm$:'rq' },\n  { base:'foo': name:'bar', perm$:'crudq' },\n  ...\n]}\n```\n\nThis specification is similar to the act specification above, except\nthat the entity type is matched against. The permission value encodes the allowed operations. There are:\n\n   * create (r): create new entities\n   * read (r): load an entity by identifier\n   * update (r): modify an entity by identifier\n   * delete (r): remove an entity by identifier\n   * query (r): perform queries to list multiple entites\n\nThe query (q) permission also allows you to perform queries for the\nread, update and delete operations, if you have permission for those\ntoo.\n\nIn the example specification above, the user has no permissions on\n-/sys/- entities, can only read and query -/foo/- entities, and\ncan perform any operations on -/foo/bar entities.\n\nThe perm$ metadata argument form is:\n\n```JavaScript\n{entity:router}\n```\n\nwhere the router is constructed in the same way as the _act_\npermission, except using the entity zone, base and name.\n The data values in the router are the _crudq_ operation\nspecifications.\n\n\n#### entity\n\nTo store as a literal, use this structure in the _perm_ property:\n\n```JavaScript\n{act:[\n  { base:'sys', perm$:'' },\n  { base:'foo', perm$:'rq' },\n  { base:'foo': name:'bar', perm$:'crudq' },\n  ...\n]}\n```\n\nThis is the same as the _entity_ permission. However, the permissions only apply if the entity has an _owner_\nproperty that matches the identifier of the user executing the action.\n\nThe perm plugin handles all the set up for you when used in a web context. See the _test/perm.app.js_ example code.\n\nThe perm$ metadata argument form is:\n\n```JavaScript\n{own:{\n  entity:router\n  owner:'...'\n}}\n```\n\nWhere the entity property is a router on the entity zone, base and\nname, has data values of the form 'crudq', and the owner is the\nidentifier of the user.\n\n\n## Access Controls\n\nAn access control procedure runs a set of ACLs against a given pair of ```entity``` and ```action```\n\nAn ACL is composed of:\n\n- a list of roles which are required for this ACL to authorize\n- a set of actions (save, update, get, list)\n- on a given entity (the type as well as specific attributes values)\n- a control type (one of required|requisite|sufficient) that determine what happens should the ACL fail or succeed:\n  - ```required``` — The service result must be successful for authentication to continue. If the test fails at this point, the user is not notified until the results of all service tests that reference that interface are complete.\n  - ```requisite``` — The service result must be successful for authentication to continue. However, if a test fails at this point, the user is notified immediately with a message reflecting the first failed required or requisite service test.\n  - ```sufficient``` — The service result is ignored if it fails. However, if the result of a service flagged sufficient is successful and no previous services flagged required have failed, then no other results are required and the user is authenticated to the service.\n\n> IMPORTANT: The order in which ```required``` ACLs are called is not critical. Only the ```sufficient``` and ```requisite``` control flags cause order to become important.\n\nExamples:\n```\n    si.use( '..', {\n      accessControls: [{\n        name: 'access to foobar entities',\n        roles: ['foobar'],\n        entities: [{\n          zone: undefined,\n          base: undefined,\n          name: 'foobar'\n        }],\n        control: 'required',\n        actions: 'crudq',\n        conditions: []\n      },{\n        name: 'access to foobar EMEA entities',\n        roles: ['EMEA'],\n        entities: [{\n          zone: undefined,\n          base: undefined,\n          name: 'foobar'\n        }],\n        control: 'required',\n        actions: 'crud',\n        conditions: [{\n            attributes: {\n              'region': 'EMEA'\n            }\n          }\n        ]\n      },{\n        name: 'access to foobar EMEA entities',\n        roles: ['private_items'],\n        entities: [{\n          zone: undefined,\n          base: undefined,\n          name: 'item'\n        }],\n        control: 'required',\n        actions: 'r',\n        conditions: [{\n            attributes: {\n              'status': 'private'\n            }\n          }\n        ]\n      }]\n    })\n```\n\n### web\n\nOut of the box, this plugin exports a web filter that looks at the logged-in user and runs the ACLs against the user's ```perm.roles``` profile attribute:\n\n    user = {\n      email: 'user@example.com',\n      perm: {\n        roles: ['foobar', 'private_items']\n      }\n    }\n\n### manual validation\n\nYou can manually invoke the ACLs by setting the ```perm$``` attribute in the arguments:\n\n      var publicAccess = si.delegate({perm$:{roles:[]}})\n      var pf1 = publicAccess.make('item',{number: 1, status: 'public'})\n\n      var privateAccess = si.delegate({perm$:{roles:['private_items']}})\n      var pf2 = privateAccess.make('item',{number: 2, status: 'private'})\n\n### current context\n\nIn some cases, you want to run access controls against the current logged in user.\nFor this, you can reference the current user in an ACL:\n\n\n    si.use( '..', {\n      accessControls: [{\n        name: 'todos: owner only',\n        roles: ['my_todos'],\n        entities: [{\n          zone: undefined,\n          base: undefined,\n          name: 'todo'\n        }],\n        control: 'required',\n        actions: 'crud',\n        conditions: [{\n            attributes: {\n              'owner': '{user.id}'\n            }\n          }\n        ]\n      }]\n    })\n\nThe above will allow users to only create, read, update or delete 'todo' objects where they are the owner.\n\n## Test\n\n```bash\nmocha test/*.test.js --seneca.log.print\n```\n\n## Tracing\n\nIf you need to trace what seneca-perm is doing you can active DEBUG before running your application:\n\n```\nDEBUG=seneca-perm:* node yourapp.js\n```\n\n\n\n","maintainers":[{"email":"iantocristian@yahoo.com","name":"iantocristian"},{"email":"soldair@gmail.com","name":"soldair"},{"email":"richard.rodger@nearform.com","name":"rjrodger"},{"email":"nherment@gmail.com","name":"nherment"}],"time":{"modified":"2022-06-26T17:39:33.690Z","created":"2013-07-01T20:37:41.653Z","0.1.0":"2013-07-01T20:37:46.421Z","0.1.1":"2013-07-09T17:08:08.996Z","0.1.2":"2014-01-29T07:27:25.380Z","0.1.10":"2014-07-10T09:57:08.561Z","0.1.11":"2014-10-09T13:08:24.251Z","0.1.12":"2014-10-22T11:19:57.587Z","0.1.13":"2014-11-07T17:38:31.479Z","0.2.0":"2014-11-10T14:25:00.685Z","0.2.1":"2014-12-11T16:50:42.462Z","0.2.2":"2015-01-13T07:35:10.783Z","0.3.0":"2015-01-23T09:52:00.333Z","0.4.0":"2015-02-02T12:55:46.650Z","0.5.0":"2015-04-14T10:51:19.928Z","0.5.1":"2015-04-14T14:04:37.536Z","0.5.2":"2015-04-20T09:23:11.392Z","0.5.3":"2015-06-19T12:06:29.103Z","0.5.4":"2015-07-02T16:42:59.943Z","0.5.5":"2015-08-18T21:27:39.500Z","0.5.6":"2015-08-19T18:52:09.445Z"},"author":{"name":"Richard Rodger","url":"http://richardrodger.com"},"repository":{"type":"git","url":"git://github.com/rjrodger/seneca-perm.git"},"readmeFilename":"README.md","homepage":"https://github.com/rjrodger/seneca-perm#readme","keywords":["seneca","perm","permissions","plugin"],"bugs":{"url":"https://github.com/rjrodger/seneca-perm/issues"},"license":"MIT"}