Skip to content

Kirby 6.0.1

$pagePermissions->can()

Returns whether the current user is allowed to do a certain action on the model

Deprecated in 6.0.0
Use $model->guards()->isAvailable() instead
$pagePermissions->can(string $action, bool $default = false): bool

Parameters

Name Type Default Description
$actionrequired string no default value
$default bool false Will be returned if $action does not exist

Return type

bool

Parent class

Kirby\Cms\PagePermissions inherited from Kirby\Cms\ModelPermissions