Update users & locations to use new permissions format
This commit is contained in:
parent
a31e5875dc
commit
d644a53951
15 changed files with 355 additions and 72 deletions
21
app/Http/Requests/API/Admin/Locations/GetLocationRequest.php
Normal file
21
app/Http/Requests/API/Admin/Locations/GetLocationRequest.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Controllers\API\Admin\Locations;
|
||||
|
||||
use Pterodactyl\Models\Location;
|
||||
use Pterodactyl\Http\Requests\API\Admin\Locations\GetLocationsRequest;
|
||||
|
||||
class GetLocationRequest extends GetLocationsRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the requested location exists on the Panel.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resourceExists(): bool
|
||||
{
|
||||
$location = $this->route()->parameter('location');
|
||||
|
||||
return $location instanceof Location && $location->exists;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue