Skip to content

v2.3.6

Choose a tag to compare

@eramitgupta eramitgupta released this 28 Oct 17:33
· 36 commits to main since this release
5b1d3fd

What's Changed

Optional Expiration for Permissions

[Feature] Add expiration feature to permissions

  • Added support for unlimited permissions with null expiration.
  • Updated the seeder and helper methods to handle null expiration as "no expiration."
  • Optimized code for performance improvements in permission management.
  • Updated README with usage instructions and examples for the new feature.

This Laravel package introduces an optional expiration feature for permissions, allowing developers to assign roles and permissions to users with a specified expiration date. This functionality provides greater control over user access, enabling you to manage permissions dynamically based on your application's needs.

Features

  • Optional Expiration Dates: When assigning permissions, you can optionally specify an expiration date.

  • Flexible Management: Users can have multiple permissions, each with its own expiration date. This allows for granular control over user access based on changing requirements or time-limited privileges.

  • Automatic Expiration Handling: The system automatically checks if a role or permission has expired. If permission is expired, it will be considered inactive, preventing access to protected resources.

Setting Expiration

If you don’t need an expiration, simply store null in the database: