mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 23:06:36 +08:00
feat(user): require email when admin creates a user
- Add `email` as a required field in `createUserRequest` - Enforce email format verification and database uniqueness checks in the admin user creation handler - Update the admin user creation frontend modal with validation and form field - Update the corresponding backend unit tests and regenerate Swagger docs
This commit is contained in:
@@ -6286,10 +6286,15 @@ const docTemplate = `{
|
||||
"user.createUserRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"email",
|
||||
"password",
|
||||
"username"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"maxLength": 255
|
||||
},
|
||||
"is_active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
@@ -6279,10 +6279,15 @@
|
||||
"user.createUserRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"email",
|
||||
"password",
|
||||
"username"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"maxLength": 255
|
||||
},
|
||||
"is_active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
@@ -987,6 +987,9 @@ definitions:
|
||||
type: object
|
||||
user.createUserRequest:
|
||||
properties:
|
||||
email:
|
||||
maxLength: 255
|
||||
type: string
|
||||
is_active:
|
||||
type: boolean
|
||||
is_admin:
|
||||
@@ -1003,6 +1006,7 @@ definitions:
|
||||
minLength: 3
|
||||
type: string
|
||||
required:
|
||||
- email
|
||||
- password
|
||||
- username
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user