mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 08:36:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			698 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			698 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace Pterodactyl\Http\Requests\Api\Application\Users;
 | |
| 
 | |
| use Pterodactyl\Models\User;
 | |
| use Pterodactyl\Services\Acl\Api\AdminAcl;
 | |
| use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
 | |
| 
 | |
| class DeleteUserRequest extends ApplicationApiRequest
 | |
| {
 | |
|     /**
 | |
|      * @var string
 | |
|      */
 | |
|     protected $resource = AdminAcl::RESOURCE_USERS;
 | |
| 
 | |
|     /**
 | |
|      * @var int
 | |
|      */
 | |
|     protected $permission = AdminAcl::WRITE;
 | |
| 
 | |
|     /**
 | |
|      * Determine if the requested user exists on the Panel.
 | |
|      *
 | |
|      * @return bool
 | |
|      */
 | |
|     public function resourceExists(): bool
 | |
|     {
 | |
|         $user = $this->route()->parameter('user');
 | |
| 
 | |
|         return $user instanceof User && $user->exists;
 | |
|     }
 | |
| }
 | 
