All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
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.
- Added a
has
method toUserCollection
which is really just an alias ofanyHave
.
- Added a
describe
method to theUser
class to get user permissions with descriptions.
- Changed dependency version limits to support later versions of Laravel.
- Changed dependencies to get around the security vulnerability in nanoid.
- 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.
- Added a simple JavaScript library to aid in using permissions on the front-end (ESM).
- Cleaned up some PHP tests.
- Added a basic MochaJS test for the new JavaScript class.
- Updated the README with info about the JavaScript implementation.
- [fixed] A bug that would cause an exception when using the
HasPermissions
trait.
- Made a change to
composer.json
causing problems with theDeadbolt
alias. #22
- The
permissions
column in the default migration is now nullable by default.
- The entire groups system has been removed. Deadbolt is supposed to be simple, but groups makes it more complex than it needs to be. Going back to basics for version 2.
- The
save()
method no longer needs to be called when persisting permission changes.
- Some documentation clean up.
- Made some changes to
composer.json
dependencies. - Removed the old
travis.yml
config.
- The
groups()
method can now take a single boolean value to include the permission descriptions keyed by the permission names.
- Version 1.0 release. Just a version bump.
- Added strict type declaration.
- Can now work with multiple users at the same time.
- Added a
users
method to theDeadboltService
which accepts an iterable collection or array of users. - Added a
UserCollection
class to represent multiple users. - There are a few collection specific methods available for testing permissions.
- Permissions can now have descriptions in the default config file.
- Renamed the
roles
togroups
as they're not actually roles. - Updated
README
documentation and linked to two articles in the wiki.
- Added a new
sync
method to theDeadbolt\User
class which will sync the provided permissions with the user. Any current permissions are revoked. - Readme updated to include the
sync
documentation.
- The
Deadbolt\Deadbolt
class has been renamed toDeadbolt\DeadboltService
to avoid confusion with IDE auto-completion asDeadbolt\Facades\Deadbolt
has the same class name.
- Updated dependencies to support Laravel 7.
- Fixed a bug in the
User::saved()
method that was not pulling the column name correctly. - Fixed a bug in the
User::saved()
method that was causing problems with cast permissions columns.
- Fixed a bug that was not assigning permissions correctly when the attribute was cast to
json
. - Fixed a bug that was not using the
column
config option correctly. - Renamed the
User::mergePermissions
method toUser::assignPermissions
.
- Fixed a bug that was not sourcing roles from the supplied driver correctly.
- Fixed a bug that was causing problems if the
permissions
attribute is cast tojson
.
- Updated the
Deadbolt::permissions()
to accept role names.
- New driver based permissions and roles source
- New Facade based API. Keeps things cleaner.