snr-authorization-rolecheckvoter

This voter will check if user has needed role(s)

Usage no npm install needed!

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

README

snr-authorization-rolecheckvoter

This is a simple voter for snr-authorizationmanager that will check if user has all specified roles.

Just call authMgr.authorize(user, 'requiredRoles:role1,role2') and it will respond true if user has both roles or false otherwise.