Update to Kirby 5
This commit is contained in:
parent
5d9979fca8
commit
0fefc5e2e1
472 changed files with 30853 additions and 10301 deletions
|
@ -11,17 +11,17 @@ return function () {
|
|||
$auth->type($allowImpersonation) === 'session' &&
|
||||
$auth->csrf() === false
|
||||
) {
|
||||
throw new AuthException('Unauthenticated');
|
||||
throw new AuthException(message: 'Unauthenticated');
|
||||
}
|
||||
|
||||
// get user from session or basic auth
|
||||
if ($user = $auth->user(null, $allowImpersonation)) {
|
||||
if ($user->role()->permissions()->for('access', 'panel') === false) {
|
||||
throw new AuthException(['key' => 'access.panel']);
|
||||
throw new AuthException(key: 'access.panel');
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
throw new AuthException('Unauthenticated');
|
||||
throw new AuthException(message: 'Unauthenticated');
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue