WidgetVoter

final class \TYPO3\CMS\Dashboard\Security\Authorization\WidgetVoter

Extends
PrincipalVoter

Decides on using a dashboard widget: isGranted(Scope::ACCESS, $widgetRegistry->getAllWidgets()['sysLogErrors']).

A widget marked "adminOnly" is granted to admins only, every other widget by a grant of the policy decision point. Widgets are granted to backend users only.

Tags

extends

Attributes

#[AsSecurityVoter]

Table of Contents

Methods

__construct()  : mixed
supportsAttribute()  : bool
supportsType()  : bool
hasRole()  : bool
supports()  : bool
voteOnAttribute()  : bool
voteOnPrincipal()  : bool

Methods

supportsAttribute()

public supportsAttribute(string $attribute) : bool

Parameters

$attribute : string

Return values

bool

supportsType()

public supportsType(string $subjectType) : bool

Parameters

$subjectType : string

Return values

bool

supports()

protected supports(string $attribute, mixed $subject) : bool

Parameters

$attribute : string
$subject : mixed

Return values

bool

voteOnAttribute()

protected final voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token[, Vote|null $vote = null ]) : bool

Parameters

$attribute : string
$subject : mixed
$token : TokenInterface
$vote : Vote|null = null

Return values

bool

voteOnPrincipal()

protected voteOnPrincipal(string $attribute, mixed $subject, Principal $principal[, Vote|null $vote = null ]) : bool

Parameters

$attribute : string
$subject : mixed
$principal : Principal
$vote : Vote|null = null

Collects the reasons of the decision, see Vote::addReason()

Return values

bool
On this page