fix bad merge

This commit is contained in:
Matthew Penner 2021-08-21 12:56:56 -06:00
parent b26556e201
commit 14eb482791
No known key found for this signature in database
GPG key ID: 5396CC4C3C1C9704
3 changed files with 5 additions and 13 deletions

View file

@ -5,20 +5,16 @@ namespace Pterodactyl\Http\Requests\Api\Client\Account;
use Pterodactyl\Models\User;
use Illuminate\Container\Container;
use Illuminate\Contracts\Hashing\Hasher;
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
use Pterodactyl\Http\Requests\Api\Client\AccountApiRequest;
use Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException;
class UpdateEmailRequest extends ClientApiRequest
class UpdateEmailRequest extends AccountApiRequest
{
/**
* @throws \Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException
*/
public function authorize(): bool
{
if (!parent::authorize()) {
return false;
}
$hasher = Container::getInstance()->make(Hasher::class);
// Verify password matches when changing password or email.

View file

@ -4,20 +4,16 @@ namespace Pterodactyl\Http\Requests\Api\Client\Account;
use Illuminate\Container\Container;
use Illuminate\Contracts\Hashing\Hasher;
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest;
use Pterodactyl\Http\Requests\Api\Client\AccountApiRequest;
use Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException;
class UpdatePasswordRequest extends ClientApiRequest
class UpdatePasswordRequest extends AccountApiRequest
{
/**
* @throws \Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException
*/
public function authorize(): bool
{
if (!parent::authorize()) {
return false;
}
$hasher = Container::getInstance()->make(Hasher::class);
// Verify password matches when changing password or email.

View file

@ -9,7 +9,7 @@ abstract class ClientApiRequest extends ApiRequest
{
/**
* Returns the permissions string indicating which permission should be used to
* validate that the authenticated user has permission to perform this action aganist
* validate that the authenticated user has permission to perform this action against
* the given resource (server).
*/
abstract public function permission(): string;