Upgrade to 4.5.0
This commit is contained in:
@@ -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',
|
||||
|
@@ -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);
|
||||
}
|
||||
],
|
||||
[
|
||||
|
Reference in New Issue
Block a user