User Email and email validation API (#10160)
* feat: wip user emails api * fix: allow admins with manage-users access to email confirmation api as well * fix: wrong route path * docs: openapi specisekai-main
parent
868bff302c
commit
d098e26f82
@ -0,0 +1,33 @@
|
||||
get:
|
||||
tags:
|
||||
- users
|
||||
summary: get user emails
|
||||
description: |
|
||||
This operation lists all emails associated with the user.
|
||||
This route is accessible to all users if the target user has elected to show their email publicly. Otherwise, it is only accessible to privileged users, or if the calling user is the same as the target user.
|
||||
parameters:
|
||||
- in: path
|
||||
required: true
|
||||
name: uid
|
||||
schema:
|
||||
type: number
|
||||
description: A valid user id
|
||||
example: 1
|
||||
responses:
|
||||
'200':
|
||||
description: user emails successfully listed
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
||||
properties:
|
||||
emails:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: An email address
|
@ -0,0 +1,25 @@
|
||||
get:
|
||||
tags:
|
||||
- users
|
||||
summary: get user's email data
|
||||
description: |
|
||||
This operation lists the data associated with a single email.
|
||||
This route is accessible to all users if the target user has elected to show their email publicly. Otherwise, it is only accessible to privileged users, or if the calling user is the same as the target user.
|
||||
parameters:
|
||||
- in: path
|
||||
required: true
|
||||
name: uid
|
||||
schema:
|
||||
type: number
|
||||
description: A valid user id
|
||||
example: 1
|
||||
- in: path
|
||||
required: true
|
||||
name: email
|
||||
schema:
|
||||
type: string
|
||||
description: A valid email address
|
||||
example: test@example.org
|
||||
responses:
|
||||
'204':
|
||||
description: user's email data successfully retrieved
|
@ -0,0 +1,34 @@
|
||||
post:
|
||||
tags:
|
||||
- users
|
||||
summary: validate a user's email address
|
||||
description: |
|
||||
Marks the passed-in user's email as confirmed.
|
||||
This route is only accessible to administrators with the `admin:users` privilege (or superadmins)
|
||||
parameters:
|
||||
- in: path
|
||||
required: true
|
||||
name: uid
|
||||
schema:
|
||||
type: number
|
||||
description: A valid user id
|
||||
example: 1
|
||||
- in: path
|
||||
required: true
|
||||
name: email
|
||||
schema:
|
||||
type: string
|
||||
description: A valid email address
|
||||
example: test@example.org
|
||||
responses:
|
||||
'200':
|
||||
description: successfully confirmed a user email
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
$ref: ../../../../../components/schemas/Status.yaml#/Status
|
||||
response:
|
||||
type: object
|
Loading…
Reference in New Issue