0.0.1 • Published 10 years ago

snr-authorization-authvoter v0.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
10 years ago

snr-authorization-authvoter

This is probably simplest voter for snr-authorizationmanager. It just check if user is authorized (user variable is not falsey). You can provede an Array of resources that you want to authorize

var authMgr = require('snr-authorizationmanager');
var authVoter = require('snr-authorization-authvoter');

authMgr.addVoter(authVoter([
  'route:/admin'
]));