DatabasePermissionChecker
Read onlyYes
FinalYes
Permission checker for database-stored form definitions
Encapsulates all backend user permission checks for the database storage adapter:
- TCA table existence checks
- Table read/write access
- Page-level access (web mounts, page permissions)
Table of Contents
Methods
- __construct() : mixed
- assertReadAccessForRecord() : void
- Assert that the current backend user has read permissions for the page a given form record is stored on.
- assertWriteAccessForRecord() : void
- Assert that the current backend user has write permissions for the page a given form record is stored on.
- hasReadPermission() : bool
- Check if the current backend user has read permissions for the given page
- hasWritePermission() : bool
- Check if the current backend user has write permissions for the given page
Methods
__construct()
public
__construct(TcaSchemaFactory $tcaSchemaFactory) : mixed
Parameters
- $tcaSchemaFactory : TcaSchemaFactory
assertReadAccessForRecord()
Assert that the current backend user has read permissions for the page a given form record is stored on.
public
assertReadAccessForRecord(int $uid, array<string|int, mixed>|null $record) : void
Parameters
- $uid : int
- $record : array<string|int, mixed>|null
Tags
assertWriteAccessForRecord()
Assert that the current backend user has write permissions for the page a given form record is stored on.
public
assertWriteAccessForRecord(int $uid, array<string|int, mixed>|null $record) : void
Parameters
- $uid : int
- $record : array<string|int, mixed>|null
Tags
hasReadPermission()
Check if the current backend user has read permissions for the given page
public
hasReadPermission(int $pageId) : bool
Parameters
- $pageId : int
Return values
boolhasWritePermission()
Check if the current backend user has write permissions for the given page
public
hasWritePermission(int $pageId) : bool
Parameters
- $pageId : int