2020-12-28 19:47:08 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Roles;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\AdminRole;
|
|
|
|
|
2021-01-05 21:52:49 +00:00
|
|
|
class GetRoleRequest extends GetMountsRequest
|
2020-12-28 19:47:08 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the requested role exists on the Panel.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function resourceExists(): bool
|
|
|
|
{
|
|
|
|
$role = $this->route()->parameter('role');
|
|
|
|
|
|
|
|
return $role instanceof AdminRole && $role->exists;
|
|
|
|
}
|
|
|
|
}
|