entrust
entrust copied to clipboard
[Enhancement] Added ability to add individual Permissions to User
Basically #800 but with latest base fork (supporting Laravel 5.5)
- [x] Added docblocs which were missing in #800
- [x] Added
scopeWithPermissiontoEntrustUserTrait.php - [x] Updated README.md
Why?
Let's say I have a user, Joao, he is a reviewer who has x number of permissions defined in a role. But let's say I want Joao to edit other people's reviews too, but to do that, I'd need to add a new Role with additional Permission of editing other people's reviews too which would become chaotic as for each and every different type of permission, I'd need to create a new role.
Take a look at the screens:
Role:

Permission:

This highly increases the functionality of this awesome plugin and I bet the community would appreciate if they had an option to assign individual roles to user instead of creating temp roles for each and every permutation and combination of permissions and roles.
PS. I (might) have to update the README with more detailed example and usage.
PPS. I've not taken a look at the Tests yet, just copy-pasted them from @csi0n PR
PHP 5.x tests failing cause:
Problem 1
- Installation request for doctrine/inflector 1.2.x-dev -> satisfiable by doctrine/inflector[1.2.x-dev].
- doctrine/inflector 1.2.x-dev requires php ^7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 2
- Installation request for illuminate/cache 5.5.x-dev -> satisfiable by illuminate/cache[5.5.x-dev].
- illuminate/cache 5.5.x-dev requires php >=7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 3
- Installation request for illuminate/console 5.5.x-dev -> satisfiable by illuminate/console[5.5.x-dev].
- illuminate/console 5.5.x-dev requires php >=7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 4
- Installation request for illuminate/contracts 5.5.x-dev -> satisfiable by illuminate/contracts[5.5.x-dev].
- illuminate/contracts 5.5.x-dev requires php >=7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 5
- Installation request for illuminate/support 5.5.x-dev -> satisfiable by illuminate/support[5.5.x-dev].
- illuminate/support 5.5.x-dev requires php >=7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 6
- Installation request for illuminate/container 5.5.x-dev -> satisfiable by illuminate/container[5.5.x-dev].
- illuminate/container 5.5.x-dev requires php >=7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 7
- Installation request for illuminate/database 5.5.x-dev -> satisfiable by illuminate/database[5.5.x-dev].
- illuminate/database 5.5.x-dev requires php >=7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 8
- Installation request for mockery/mockery 1.0.x-dev -> satisfiable by mockery/mockery[1.0.x-dev].
- mockery/mockery 1.0.x-dev requires php >=5.6.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 9
- Installation request for mockery/mockery dev-master -> satisfiable by mockery/mockery[dev-master].
- mockery/mockery dev-master requires php >=5.6.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 10
- Installation request for sami/sami 4.0.x-dev -> satisfiable by sami/sami[4.0.x-dev].
- sami/sami 4.0.x-dev requires php >=7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 11
- Installation request for sami/sami dev-master -> satisfiable by sami/sami[dev-master].
- sami/sami dev-master requires php >=7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Problem 12
- Installation request for twig/twig 2.x-dev -> satisfiable by twig/twig[2.x-dev].
- twig/twig 2.x-dev requires php ^7.0 -> your PHP version (5.5.38) does not satisfy that requirement.
Everything passed in PHP 7
Why the hell hasn't this been merged?
No idea @UniBen