laravel-roles/tests/Unit
Fabian @ Blax Software 2ca17ba914 feat: add HasRequiredAccess trait for OR-combined entity dependencies
Introduces a generic "Required Access" mechanism: any model using
HasRequiredAccess can list other entities as required-access targets;
if the requesting entity has access to ANY of them — direct, role,
or permission — the holder is considered unlocked. Sits alongside
Required Roles / Permissions and is OR-combined with them.

The unlock check resolves in a single EXISTS query that joins
required_accesses with accesses, so cost stays O(1) regardless of
target count.

20 new unit tests cover relations, sync semantics, expiry handling,
isolation between holders, and the constant-cost query property.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 12:35:09 +02:00
..
HasAccessSourceTest.php feat: Enhance access management with source tracking and revocation 2026-04-26 09:54:57 +02:00
HasAccessTest.php feat: Enhance access management with source tracking and revocation 2026-04-26 09:54:57 +02:00
HasPermissionsTest.php feat: Enhance access management with source tracking and revocation 2026-04-26 09:54:57 +02:00
HasRequiredAccessTest.php feat: add HasRequiredAccess trait for OR-combined entity dependencies 2026-04-27 12:35:09 +02:00
HasRolesTest.php feat: Enhance access management with source tracking and revocation 2026-04-26 09:54:57 +02:00
MigrationAutoLoadTest.php feat: Enhance access management with source tracking and revocation 2026-04-26 09:54:57 +02:00