Skip to content

Kirby 4.5.0

$sitepermissions->can()

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

$sitepermissions->can(string $action, bool $default = false): bool

Parameters

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

Return type

bool

Parent class

Kirby\Cms\SitePermissions inherited from Kirby\Cms\ModelPermissions