Skip to content

Releases: JosephSilber/bouncer

v0.0.26

08 Dec 14:55
Compare
Choose a tag to compare
v0.0.26 Pre-release
Pre-release

Added new notA and notAn methods, so you can now check for the absence of roles:

Bouncer::is($user)->notA('moderator');
Bouncer::is($user)->notAn('editor');

Also added the isNot method to the user trait:

$user->isNot('admin');

Fixes:

  • Model names weren't being passed through properly in the user trait's allow and disallow methods. dcfd741
  • Model abilities were sometimes being conflated. fe480de

v0.0.25

29 Nov 22:28
Compare
Choose a tag to compare
v0.0.25 Pre-release
Pre-release

Changed the bouncer's seeding method names. 9489bf1

v0.0.24

29 Nov 22:21
Compare
Choose a tag to compare
v0.0.24 Pre-release
Pre-release

Bouncer::refresh() now works for cache drivers with no cache tags. f641451

v0.0.23

29 Nov 22:04
Compare
Choose a tag to compare
v0.0.23 Pre-release
Pre-release

Added seeding.

v0.0.22

22 Nov 19:39
Compare
Choose a tag to compare
v0.0.22 Pre-release
Pre-release

You can now extend the built-in Ability & Role model classes.

After creating your own models, register them with the bouncer:

Bouncer::useAbilityModel(MyAbility::class);

Bouncer::useRoleModel(MyRole::class);

You can also use this to override the default table names; the migrations will use whatever table names you specified in your own models.