Skip to content

Releases: tpg/deadbolt

v2.2.5

29 Nov 07:18
Compare
Choose a tag to compare

This is a really, really, really tiny release, just to update the JS dependencies.

  • Updated typescript dependency to ^4.9.0.
  • Updated mocha dependency to ^10.1.0.

v2.2.4

07 Jun 09:11
Compare
Choose a tag to compare

Added some syntactic sugar with a has method on the UserCollection class. It's really just an alias for anyHave.

v2.2.3

06 Jun 21:44
d607257
Compare
Choose a tag to compare

Added a describe method to the User class.

v2.2.2

27 Jan 08:15
Compare
Choose a tag to compare

Support for versions of Laravel > 8.

v2.2.1

25 Jan 07:34
Compare
Choose a tag to compare

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

03 Nov 22:06
94ce0b0
Compare
Choose a tag to compare

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

01 Sep 08:00
Compare
Choose a tag to compare

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.

v2.0.2

18 Aug 12:36
Compare
Choose a tag to compare

This minor release fixes a bug in the composer.json file which caused a problem when attempting to use the Deadbolt alias. This should fix #22.

v2.0.1

11 Aug 09:35
3902cfb
Compare
Choose a tag to compare

Ensure that the permissions column added to the users table is nullable. Fixes #21.

v2.0.0

16 Jul 13:59
Compare
Choose a tag to compare

Version 2 makes a fairly large breaking change.

  • The entire groups system has been removed. Deadbolt is supposed to be simple, but groups makes it more complex than it needs to be. If you still need groups, you'll need to implement something yourself. Deadbolt is a permissions library, and that's it.
  • A new HasPermissions trait has been added providing a whole new way to work with permissions and users.
  • There's no longer a need to call the save() method. Permissions are persistent by default now.
  • Minimum PHP version is now 7.3 to match Laravel 7 framework requirement.