Upgrade to 4.5.0

This commit is contained in:
Bastian Allgeier
2024-11-28 11:24:28 +01:00
parent 49287c7a5e
commit 63ddf40692
86 changed files with 942 additions and 491 deletions

View File

@@ -31,6 +31,18 @@ return [
];
}
],
[
'pattern' => 'system/method-test',
'method' => 'PATCH',
'action' => function () {
return [
'status' => match ($this->kirby()->request()->method()) {
'PATCH' => 'ok',
default => 'fail'
}
];
}
],
[
'pattern' => 'system/register',
'method' => 'POST',

View File

@@ -203,7 +203,9 @@ return [
'users/(:any)/roles',
],
'action' => function (string $id) {
return $this->user($id)->roles();
$kirby = $this->kirby();
$purpose = $kirby->request()->get('purpose');
return $this->user($id)->roles($purpose);
}
],
[