DatabasePermissionChecker

final readonly class \TYPO3\CMS\Form\Storage\Permission\DatabasePermissionChecker

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

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|null $record) : void

Parameters

$uid : int
$record : array|null

Tags

throws
PersistenceManagerException

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|null $record) : void

Parameters

$uid : int
$record : array|null

Tags

throws
PersistenceManagerException

hasReadPermission()

Check if the current backend user has read permissions for the given page

public hasReadPermission(int $pageId) : bool

Parameters

$pageId : int

Return values

bool

hasWritePermission()

Check if the current backend user has write permissions for the given page

public hasWritePermission(int $pageId) : bool

Parameters

$pageId : int

Return values

bool
On this page