Finish putting permissions on the API

This commit is contained in:
Dane Everitt 2018-01-13 14:08:19 -06:00
parent d644a53951
commit 11c4f3f6f2
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
14 changed files with 434 additions and 82 deletions

View file

@ -0,0 +1,21 @@
<?php
namespace Pterodactyl\Http\Requests\API\Admin\Nodes;
use Pterodactyl\Models\Node;
use Pterodactyl\Http\Requests\API\Admin\ApiAdminRequest;
class GetNodeRequest extends ApiAdminRequest
{
/**
* Determine if the requested node exists on the Panel.
*
* @return bool
*/
public function resourceExists(): bool
{
$node = $this->route()->parameter('node');
return $node instanceof Node && $node->exists;
}
}