fix bad merge
This commit is contained in:
parent
b26556e201
commit
14eb482791
3 changed files with 5 additions and 13 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue