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)
Internal

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<string|int, mixed>|null $record) : void
Parameters
$uid : int
$record : array<string|int, mixed>|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<string|int, mixed>|null $record) : void
Parameters
$uid : int
$record : array<string|int, mixed>|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

Search results