Releases: tpg/deadbolt
v2.3.0
- [Bug] fix two missing methods identified in #31. Methods were previously removed, but documentation was not updated. Methods have been returned.
- [Improvement] Added support for PHP 8.4 and Laravel 12.
- [Improvement] Updated NPM dependencies to address potential vulnerabilities
- [Change] Removed
styleciin favour of Laravel Pint.
v2.2.5
This is a really, really, really tiny release, just to update the JS dependencies.
- Updated
typescriptdependency to ^4.9.0. - Updated
mochadependency to ^10.1.0.
v2.2.4
Added some syntactic sugar with a has method on the UserCollection class. It's really just an alias for anyHave.
v2.2.3
Added a describe method to the User class.
v2.2.2
Support for versions of Laravel > 8.
v2.2.1
Updated dependencies to get round a vulnerability in nanoid versions less than 3.1.31. Nanoid is a dependency of Mocha which is used for testing the simple JavaScript component we added.
Other dependencies have been upgraded as well.
v2.2.0
This only updates there JavaScript library. Just a little more logical, I think.
- Slight breaking change in the JavaScript helper. The constructor will now only accept a permissions array or JSON encoded string.
- You don't need to pass a whole user object into the
Deadbolt()constructor.
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.