v2.1.0
This release includes something a little different. Deadbolt was initially started so I could easily test permissions in a JavaScript front-end. That requirement hasn't really changed, so I've added a simple JavaScript class which can be used to test for permissions on the front-end.
It's really simple and doesn't do anything magical, but it's handy and means you don't have to do this yourself.
You can use it like this:
import Deadbolt from '../../vendor/thepublicgood/deadbolt/dist/Deadbolt.js';
const permissions = new Deadbolt(user); // the `user` object from your laravel app.
const can = permissions.has('articles.create');
There's more info in the README.
This release also includes some clean-ups around the tests and a bug that pops up when using the HasPermissions
trait.