Upgrade Kirby from 4.3.0 to 4.4.0
This commit is contained in:
parent
03905dbd83
commit
3bed01af75
293 changed files with 54254 additions and 187 deletions
|
|
@ -41,7 +41,8 @@ class Permissions
|
|||
],
|
||||
'languages' => [
|
||||
'create' => true,
|
||||
'delete' => true
|
||||
'delete' => true,
|
||||
'update' => true
|
||||
],
|
||||
'pages' => [
|
||||
'access' => true,
|
||||
|
|
@ -109,18 +110,21 @@ class Permissions
|
|||
}
|
||||
}
|
||||
|
||||
public function for(string $category = null, string $action = null): bool
|
||||
{
|
||||
public function for(
|
||||
string|null $category = null,
|
||||
string|null $action = null,
|
||||
bool $default = false
|
||||
): bool {
|
||||
if ($action === null) {
|
||||
if ($this->hasCategory($category) === false) {
|
||||
return false;
|
||||
return $default;
|
||||
}
|
||||
|
||||
return $this->actions[$category];
|
||||
}
|
||||
|
||||
if ($this->hasAction($category, $action) === false) {
|
||||
return false;
|
||||
return $default;
|
||||
}
|
||||
|
||||
return $this->actions[$category][$action];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue