$filePermissions->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.
$filePermissions->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
| Type | Description |
|---|---|
Kirby\Exception\PermissionException |
Parent class
Kirby\Guards\FilePermissions
inherited from Kirby\Guards\ModelPermissions