AccessDecisionService
in package
Access Decision Service.
Main decision engine for access control. Integrates trust levels, embargoes, access rules, and POPIA compliance.
Table of Contents
Methods
- __construct() : mixed
- checkAccess() : array{allowed: bool, reason: string|null, level: string}
- Check if user can access an object.
- logAccess() : void
- Log access attempt.
Methods
__construct()
public
__construct() : mixed
checkAccess()
Check if user can access an object.
public
checkAccess(int $objectId[, int|null $userId = null ][, string $action = 'view' ][, int|null $institutionId = null ]) : array{allowed: bool, reason: string|null, level: string}
Parameters
- $objectId : int
- $userId : int|null = null
- $action : string = 'view'
- $institutionId : int|null = null
Return values
array{allowed: bool, reason: string|null, level: string}logAccess()
Log access attempt.
public
logAccess(int $objectId, int|null $userId, string $action, bool $allowed[, string|null $reason = null ][, string|null $ipAddress = null ]) : void
Parameters
- $objectId : int
- $userId : int|null
- $action : string
- $allowed : bool
- $reason : string|null = null
- $ipAddress : string|null = null