Add event-admin password reset flow
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-06 11:02:09 +01:00
parent 51e8beb46c
commit 54b3fa0d87
17 changed files with 1080 additions and 81 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Http\Requests\Auth;
use Illuminate\Foundation\Http\FormRequest;
class TenantAdminForgotPasswordRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'email' => ['required', 'email'],
];
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Http\Requests\Auth;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rules;
class TenantAdminResetPasswordRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'token' => ['required', 'string'],
'email' => ['required', 'email'],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
];
}
}

View File

@@ -18,7 +18,7 @@ class TenantAdminTokenRequest extends FormRequest
public function rules(): array
{
return [
'login' => ['required', 'string'],
'login' => ['required', 'email'],
'password' => ['required', 'string'],
];
}
@@ -27,10 +27,6 @@ class TenantAdminTokenRequest extends FormRequest
{
$login = $this->string('login')->trim()->value();
if (filter_var($login, FILTER_VALIDATE_EMAIL)) {
return ['email' => $login, 'password' => $this->string('password')->value()];
}
return ['username' => $login, 'password' => $this->string('password')->value()];
return ['email' => $login, 'password' => $this->string('password')->value()];
}
}