New
-
Polymorphic structure: Bouncer now uses a new polymorphic database schema, so that you can attach roles and abilities to any model (see here how to upgrade your schema).
-
Wildcard abilities: you can now use wildcards to allow a wide spread of abilities:
Bouncer::allow($user)->to('edit', '*'); Bouncer::allows('edit', $post) == true;
For more information on wildcards, see this discussion: #56
-
whereAssignedTo
query scope:Role::whereAssignedTo($users)
will return all roles assigned to those users. -
whereCannot
query scope:User::whereCannot('edit', Post::class)
will return all users that can't edit posts.
Pending
The following is what's holding up the 1.0 stable release:
- Wildcards in scopes: currently, not all query scopes handle wildcards properly. We need full wildcard support in all query scopes before 1.0 can be released.
- Wildcard aliases: we need proper alias methods for most of the wildcard operations. See this discussion for more information.
- Documentation: there are still a lot of things missing from the documentation. I want to properly flesh it out before the 1.0 release.