PrincipalContext

final readonly class \TYPO3\CMS\Core\Security\PermissionSet\PrincipalContext

Represents the identity and group membership of a principal for authorization.

Contains the core identity information needed for permission evaluation, including the role level, unique identifier, group memberships, and impersonation context. This is used as part of the Principal object to provide context for permission checks.

Table of Contents

Properties

$groupIds  : array
$id  : int
$impersonatedBy  : self|null
$role  : PrincipalRole

Methods

__construct()  : mixed

Properties

$impersonatedBy

public self|null $impersonatedBy = null

Methods

__construct()

public __construct(PrincipalRole $role, int $id[, int[] $groupIds = [] ][, self|null $impersonatedBy = null ]) : mixed

Parameters

$role : PrincipalRole

The role level of the principal

$id : int

The unique identifier of the principal (user ID, system ID)

$groupIds : int[] = []

List of group IDs the principal belongs to

$impersonatedBy : self|null = null

Optional parent context when impersonation is active

On this page