Releases: santigarcor/laratrust
Releases · santigarcor/laratrust
5.0.0
Added
- Added syncRolesWithoutDetaching and syncPermissionsWithoutDetaching methods. (#177)
- Added strict option when checking teams. (#187)
- Added option to set the guard in the middlewares(#186, 717cdfc)
- Added middleware auto registering. (4f128e6)
- Added a helper class. (ea513a6)
- Added Laravel like event system. (#151, 6342410, 2c0ee36)
- Added option to use Laravel's cache or not. (#201, 227c89d)
Changed
- Changed the Ownable interface to receive the owner in the ownerKey method in case the owner key check changes depending of the type of the owner. (b68e9ea)
- Changed the commands 'fire' method to 'handle' in order to work properly in Laravel 5.5. (#172)
- Use Laravel standard for enable and disable foreign key checks. (#190)
- Changed the folder structure. (ccf7b81)
- Changed the unit tests to an integration tests approach. (bd0b664)
Fix seeder creation
Fix Laravel 5.5 Commands compatibility
Enable Laravel >=5.1.40 support
Merge pull request #169 from santigarcor/KKSzymanowski-patch-1 Add a note about config cache clearing to the docs
Teams feature now supported
Added
- Added optional teams feature to the roles and permissions workflow.
- Added
allPermissions
method to theLaratrustUserTrait
. - Added
required_all
option to the middlewares. - Can pass a pipe separated string when checking roles and permissions.
- Added
wherePermissionIs
query scope to theLaratrustUserTrait
. - Added magic method to check permissions with can (e.g.
$user->canManageUsers()
) - Added automatic package discovery for Laravel 5.5.
Changed
- Changed minimum Laravel version to 5.2.
- Changed the
laratrust.php
file structure.
Multiple user models now supported
- Added support to multiple user models.
- Added
hasPermission
andisAbleTo
methods. - Changed the internal calls of the
can
method to thehasPermission
method. - Minimum Laravel version is 5.1.
- Removed the route filters funtionality since it was only working in Laravel 5.0.
New Ownable Interface
- New Ownable interface.
- New
canAndOwns
andhasRoleAndOwns
methods.
With this release you can check easily if a user can/has role and owns an object. If the ownership is resolved with a complex logic you can do it by using the Ownable interface.
3.1.0
- Added Users - Permissions feature.
- Changed commands names.
- Added SQLServer support to the seeder.
3.0.5
- Added model's ownership
- Now migration generation uses all config values
Fix typo in middleware
- Solves typo in the middlewares #24