Skip to content

Kirby 6.0.0

$pagePermissions->ensure()

Runs the permission check for the given action. Actions with a dedicated ensureTo<Action>() method are handed over to it, all others are resolved against the permission rules.

$pagePermissions->ensure(string $action, bool $default = false): void

Parameters

Name Type Default Description
$actionrequired string no default value
$default bool false Used if the action has no permission rule

Exceptions

Parent class

Kirby\Guards\PagePermissions inherited from Kirby\Guards\ModelPermissions