RecordAccessVoter

Checks if a record can be accessed (usually in TYPO3 Frontend) due to various "enableFields" or group access checks.

Not related to "write permissions" etc.

Table of Contents

Properties

$eventDispatcher  : EventDispatcherInterface

Methods

__construct()  : mixed
accessGranted()  : bool
Checks page record for enableFields Returns TRUE if enableFields does not disable the page record.
accessGrantedForPageInRootLine()  : bool
Checks if the current page of the root line is visible.
groupAccessGranted()  : bool
Check group access against a record, if the current users' groups match the fe_group values of the record.
getEnableFieldsConfigurationForTable()  : array<string|int, mixed>

Properties

$eventDispatcher read-only

protected EventDispatcherInterface $eventDispatcher

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher) : mixed
Parameters
$eventDispatcher : EventDispatcherInterface

accessGranted()

Checks page record for enableFields Returns TRUE if enableFields does not disable the page record.

public accessGranted(string $table, array<string|int, mixed> $record, Context $context) : bool

Takes notice of the includeHiddenPages visibility aspect flag and uses SIM_ACCESS_TIME for start/endtime evaluation

Parameters
$table : string

the TCA table to check for

$record : array<string|int, mixed>

The record to evaluate (needs fields: hidden, starttime, endtime, fe_group)

$context : Context

Context API to check against

Return values
bool

TRUE, if record is viewable.

accessGrantedForPageInRootLine()

Checks if the current page of the root line is visible.

public accessGrantedForPageInRootLine(array<string|int, mixed> $pageRecord, Context $context) : bool

If the field extendToSubpages is 0, access is granted, else the fields hidden, starttime, endtime, fe_group are evaluated.

Parameters
$pageRecord : array<string|int, mixed>
$context : Context
Internal

this is a special use case and should only be used with care, not part of TYPO3's Public API.

Return values
bool

groupAccessGranted()

Check group access against a record, if the current users' groups match the fe_group values of the record.

public groupAccessGranted(string $table, array<string|int, mixed> $record, Context $context) : bool
Parameters
$table : string

the TCA table to check for

$record : array<string|int, mixed>

The record to evaluate (needs enableField: fe_group)

$context : Context

Context API to check against

Return values
bool

TRUE, if group access is granted.

getEnableFieldsConfigurationForTable()

protected getEnableFieldsConfigurationForTable(string $table) : array<string|int, mixed>
Parameters
$table : string
Return values
array<string|int, mixed>

        
On this page

Search results