Add initial go at user created databases for servers, still needs cleaning

This commit is contained in:
Dane Everitt 2018-03-01 21:27:37 -06:00
parent 87b96bdfc8
commit 07893effa3
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 314 additions and 25 deletions

View file

@ -2,6 +2,7 @@
namespace Pterodactyl\Http\Requests\Server;
use Pterodactyl\Models\Server;
use Pterodactyl\Http\Requests\FrontendUserFormRequest;
abstract class ServerFormRequest extends FrontendUserFormRequest
@ -24,6 +25,11 @@ abstract class ServerFormRequest extends FrontendUserFormRequest
return false;
}
return $this->user()->can($this->permission(), $this->attributes->get('server'));
return $this->user()->can($this->permission(), $this->getServer());
}
public function getServer(): Server
{
return $this->attributes->get('server');
}
}