mirror of
https://github.com/pelican-dev/panel.git
synced 2026-05-04 18:00:48 +03:00
Add test coverage and fix permissions mistake
This commit is contained in:
@@ -62,7 +62,7 @@ class SftpAuthenticationController extends Controller
|
||||
}
|
||||
|
||||
if (!$key || !$user->sshKeys()->where('fingerprint', $key->getFingerprint('sha256'))->exists()) {
|
||||
$this->reject($request, false);
|
||||
$this->reject($request, is_null($key));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class SftpAuthenticationController extends Controller
|
||||
|
||||
return new JsonResponse([
|
||||
'server' => $server->uuid,
|
||||
'permissions' => $permissions ?? ['*'],
|
||||
'permissions' => $this->permissions->handle($server, $user),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user