snr-authorization-authvoter

This is the voter for snr-authorizationmanager, that allow access for authenticated users

Usage no npm install needed!

<script type="module">
  import snrAuthorizationAuthvoter from 'https://cdn.skypack.dev/snr-authorization-authvoter';
</script>

README

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'
]));