Commit Graph

11 Commits

Author SHA1 Message Date
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
Fabian @ Blax Software 20d94caa33 feat: Enhance access management with source tracking and revocation
- Added source_id and source_type fields to the Access model to track the origin of access grants.
- Implemented source relationship in the Access model for better access management.
- Introduced revokeBySource method to delete access entries based on their source.
- Updated grantAccess and revokeAccess methods to handle source parameters for more granular control.
- Added RevokesAccessOnDelete trait to automatically revoke access when the source model is deleted.
- Created SourceAccessesRevoked event to notify when access grants are revoked due to source deletion.
- Enhanced tests to cover new source-related functionality and ensure proper behavior during access management.
- Updated RolesServiceProvider to support auto-loading migrations based on configuration.
- Added migration files for creating roles and access tables, including source columns for existing installations.
2026-04-26 09:54:57 +02:00
Fabian @ Blax Software 7878069c0b AM access capabilities 2026-02-23 11:16:27 +01:00
a6a2f5842 87d2429630 I hasPermissions 2025-06-19 15:08:49 +02:00
a6a2f5842 d9bdc10f78 RMI permissions table/structure & has permission trait 2025-06-19 13:36:10 +02:00
a6a2f5842 cf337a8bb6 A traits, I fields 2025-06-16 09:49:36 +02:00
a6a2f5842 5e7510e026 AC migration tables names 2025-06-16 08:04:18 +02:00
a6a2f5842 7ddd3491e1 R renamed config & files 2025-06-16 07:37:35 +02:00
a6a2f5842 1fb57141bc I basic structure 2025-06-15 18:29:50 +02:00
a6a2f5842 7cfc7749cc A more files & structure 2025-06-15 11:56:28 +02:00
Alexander Blasl e4a6824dcb Init 2025-06-11 15:44:39 +02:00