mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 04:26:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			753 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			753 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace Pterodactyl\Http\Requests\Api\Application\Allocations;
 | 
						|
 | 
						|
use Pterodactyl\Models\Node;
 | 
						|
use Pterodactyl\Services\Acl\Api\AdminAcl;
 | 
						|
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
 | 
						|
 | 
						|
class GetAllocationsRequest extends ApplicationApiRequest
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * @var string
 | 
						|
     */
 | 
						|
    protected $resource = AdminAcl::RESOURCE_ALLOCATIONS;
 | 
						|
 | 
						|
    /**
 | 
						|
     * @var int
 | 
						|
     */
 | 
						|
    protected $permission = AdminAcl::READ;
 | 
						|
 | 
						|
    /**
 | 
						|
     * Determine if the node that we are requesting the allocations
 | 
						|
     * for exists on the Panel.
 | 
						|
     *
 | 
						|
     * @return bool
 | 
						|
     */
 | 
						|
    public function resourceExists(): bool
 | 
						|
    {
 | 
						|
        $node = $this->route()->parameter('node');
 | 
						|
 | 
						|
        return $node instanceof Node && $node->exists;
 | 
						|
    }
 | 
						|
}
 |