CoolCMS API

OwnershipOverrideChecker
in package

Helper of the privilege matrix (`PrivilegeGroup/edit.latte`): does a grant of a conditional role (`owner`, `receiver`) have any effect for the key? Without an ownership check in the Api presenter, `ALLOW_IF_OWNER` is a fail-closed deny, so the admin disables such a checkbox.

The reflection itself lives in ConditionalRoleSupport (Core), because the server enforces the same rule when saving the matrix and the Api layer must not depend on Admin. This is only a thin admin facade.

Table of Contents

Properties

$support  : ConditionalRoleSupport

Methods

__construct()  : mixed
hasOwnershipOverride()  : bool
Tells whether the Api presenter of the key overrides `verifyOwnership()`; always `false` for keys outside `:Api:`.
hasReceiverSupport()  : bool
Tells whether the key's presenter can check the receiver (entity with `ReceiverAwareInterface` or its own `isReceiver()`).
supportsConditionalRole()  : bool
Tells whether the key's presenter can evaluate the conditional role with this code; an unknown role counts as yes (cannot be judged).

Properties

Methods

hasOwnershipOverride()

Tells whether the Api presenter of the key overrides `verifyOwnership()`; always `false` for keys outside `:Api:`.

public hasOwnershipOverride(string $key) : bool
Parameters
$key : string
Return values
bool

hasReceiverSupport()

Tells whether the key's presenter can check the receiver (entity with `ReceiverAwareInterface` or its own `isReceiver()`).

public hasReceiverSupport(string $key) : bool
Parameters
$key : string
Return values
bool

supportsConditionalRole()

Tells whether the key's presenter can evaluate the conditional role with this code; an unknown role counts as yes (cannot be judged).

public supportsConditionalRole(string $roleCode, string $key) : bool
Parameters
$roleCode : string
$key : string
Return values
bool
On this page

Search results