Fix bug with client API denying access to routes, closes #1366
This commit is contained in:
parent
b5c13f14e6
commit
9b654d2c76
4 changed files with 39 additions and 37 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Pterodactyl\Http\Requests\Api\Client\Servers;
|
||||
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
|
||||
|
||||
class GetServerRequest extends ClientApiRequest
|
||||
|
@ -18,14 +17,4 @@ class GetServerRequest extends ClientApiRequest
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the user should even know that this server exists.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resourceExists(): bool
|
||||
{
|
||||
return $this->user()->can('view-server', $this->getModel(Server::class));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue