33 lines
708 B
PHP
33 lines
708 B
PHP
|
<?php
|
||
|
|
||
|
namespace Pterodactyl\Http\Requests\Api\Application\Mounts;
|
||
|
|
||
|
use Pterodactyl\Models\Mount;
|
||
|
use Pterodactyl\Services\Acl\Api\AdminAcl;
|
||
|
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
||
|
|
||
|
class DeleteMountRequest extends ApplicationApiRequest
|
||
|
{
|
||
|
/**
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $resource = AdminAcl::RESOURCE_MOUNTS;
|
||
|
|
||
|
/**
|
||
|
* @var int
|
||
|
*/
|
||
|
protected $permission = AdminAcl::WRITE;
|
||
|
|
||
|
/**
|
||
|
* Determine if the requested mount exists on the Panel.
|
||
|
*
|
||
|
* @return bool
|
||
|
*/
|
||
|
public function resourceExists(): bool
|
||
|
{
|
||
|
$mount = $this->route()->parameter('mount');
|
||
|
|
||
|
return $mount instanceof Mount && $mount->exists;
|
||
|
}
|
||
|
}
|