misc_pterodactyl-panel/app/Http/Requests/Api/Application/Roles/GetRoleRequest.php

21 lines
421 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Http\Requests\Api\Application\Roles;
use Pterodactyl\Models\AdminRole;
class GetRoleRequest extends GetRolesRequest
{
/**
* 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;
}
}