Go to file
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
.vscode A traits, I fields 2025-06-16 09:49:36 +02:00
config feat: add HasRequiredAccess trait for OR-combined entity dependencies 2026-04-27 12:35:09 +02:00
database/migrations feat: add HasRequiredAccess trait for OR-combined entity dependencies 2026-04-27 12:35:09 +02:00
src feat: add HasRequiredAccess trait for OR-combined entity dependencies 2026-04-27 12:35:09 +02:00
tests/Unit feat: add HasRequiredAccess trait for OR-combined entity dependencies 2026-04-27 12:35:09 +02:00
.dockerignore I has permissions trait 2025-07-10 10:29:53 +02:00
.gitattributes A traits, I fields 2025-06-16 09:49:36 +02:00
.gitignore I context logic & tests 2026-03-31 18:56:47 +02:00
composer.json feat: add Laravel 13 support 2026-04-16 07:49:51 +02:00
phpunit.xml A ccess 2026-02-24 12:07:32 +01:00
pint.json A more files & structure 2025-06-15 11:56:28 +02:00