{"repo":"beyonk/sapper-rbac","free":true,"listed":false,"github":"https://github.com/beyonk/sapper-rbac","clone":"git clone https://github.com/beyonk/sapper-rbac.git","description":"RBAC for Sapper","language":"JavaScript","stars":81,"topics":["svelte","sveltejs","sapper","rbac","role","security","api","ssr"],"license":null,"category":"security-tools","readme_excerpt":"RBAC for Sapper Role-based access control for Sapper. Works on both the server-, and, client-side. Install Install as a dev dependency: Usage Define a set of route permissions in your application For Sapper to work, /client/. is automatically unrestricted. For the server-side sessionMiddleware This middleware adds a user object at res.user (or null if the request isn't authenticated). The only required attribute of this user is scope which contains a list of authentication scopes that the user has: deny For cases where the user is denied access, call this function. The deny function receives two parameters: grant For cases where the user is granted access, call this function. For the client-side On the client side, we integrate with the page store in the root layout.svelte :","default_branch":null,"files":null,"tree":[],"storefront":"/r/beyonk","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/beyonk/sapper-rbac/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}