hypervel / permission
Role and permission management for Hypervel Eloquent models.
v0.3.28
2025-12-26 06:18 UTC
Requires
- php: ^8.2
- hypervel/auth: ^0.3
- hypervel/cache: ^0.3
- hypervel/console: ^0.3
- hypervel/core: ^0.3
- hypervel/support: ^0.3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- 0.4.x-dev
- 0.3.x-dev
- dev-main / 0.3.x-dev
- v0.3.28
- v0.3.27
- v0.3.26
- v0.3.25
- v0.3.24
- v0.3.23
- v0.3.22
- v0.3.21
- v0.3.20
- v0.3.19
- v0.3.18
- v0.3.17
- v0.3.16
- v0.3.15
- v0.3.14
- v0.3.13
- v0.3.12
- v0.3.11
- v0.3.10
- v0.3.9
- v0.3.8
- v0.3.7
- v0.3.6
- v0.3.5
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- 0.2.x-dev
- v0.2.12
- v0.2.11
- v0.2.10
- v0.2.9
This package is auto-updated.
Last update: 2026-11-02 12:42:23 UTC
README
Documentation: https://hypervel.org/docs/permission
Differences From Spatie Laravel Permission
- Hypervel adds denied permissions. A denied assignment wins over direct or role-granted allows, and the migration stores each assignment's effect in an
is_deniedcolumn, so assigning allow or deny for the same model or role and permission updates the existing assignment.getDirectPermissions(),getPermissionsViaRoles(),getAllPermissions(), andgetPermissionNames()return effective allowed permissions only;getDeniedPermissions()returns the denied ones. - The
Wildcardcontract addsgetDeniedIndex(), so wildcard checks apply denies through the same matching as allows: a denied pattern blocks the names it matches. Custom wildcard classes implement it alongsidegetIndex(). - Role and permission inputs accept unit enums as well as backed enums. Unit enums use their case names.
- Hypervel adds opt-in row partitioning through
PermissionRegistrar::resolvePartitionUsing(...). The stock migration is unpartitioned; applications that enable partitioning own a partitioned schema. - The cache configuration uses
expiration_secondsinstead ofexpiration_time, with separate named cache keys so role, model-role, model-permission, and assignment-token caches can be invalidated independently. - The cache store must keep values and refreshable atomic locks on the same backend, because concurrent cache fills are coordinated with a lock. Stack and failover stores are not supported.
- The cache store and keys are worker-wide, and
initializeCache()is for boot and tests. Instead of switching the cache per tenant during a request, use row partitioning, which also separates each tenant's cache entries. - Cached roles and permissions returned by lookups are shared within the current request or job, and lookups use indexes built when the catalog loads. Save a changed role or permission before looking up roles or permissions again. See caching.
- There is no Octane reset listener or
register_octane_reset_listeneroption. The current team and the loaded permission catalog are coroutine-local, so nothing carries over between requests.
Ported from: https://github.com/spatie/laravel-permission