This commit is contained in:
Matthew Penner 2022-12-14 18:08:50 -07:00
parent 7ed2be50fd
commit 3670dc6d4b
No known key found for this signature in database
5 changed files with 5 additions and 10 deletions

View file

@ -14,6 +14,7 @@ class StoreServerDatabaseRequest extends ApplicationApiRequest
{
public function rules(): array
{
/** @var \Pterodactyl\Models\Server $server */
$server = $this->route()->parameter('server');
return [

View file

@ -13,6 +13,6 @@ class DownloadFileRequest extends ClientApiRequest
*/
public function authorize(): bool
{
return $this->user()->can('file.read', $this->parameter('server', Server::class));
return $this->user()->can('file.read', $this->route()->parameter('server'));
}
}