Separate active state from lock state in admin API
- Allow the admin API to deactivate a user without locking it, and to unlock a user without reactivating it. - Make unlock-and-reactivate flows unset the "deactivated_at" timestamp. - Revert adding an "unlock" parameter on `ReactivateUserJob`, as the option is used only by the admin API which doesn't use a job.
This commit is contained in:
@@ -1359,6 +1359,15 @@
|
||||
"style": "simple"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DeactivateUserRequest"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "User was deactivated",
|
||||
@@ -1568,6 +1577,15 @@
|
||||
"style": "simple"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UnlockUserRequest"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "User was unlocked",
|
||||
@@ -3942,6 +3960,28 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeactivateUserRequest": {
|
||||
"title": "JSON payload for the `POST /api/admin/v1/users/:id/deactivate` endpoint",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"skip_lock": {
|
||||
"description": "Whether to skip locking the user before deactivation.",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UnlockUserRequest": {
|
||||
"title": "JSON payload for the `POST /api/admin/v1/users/:id/unlock` endpoint",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"skip_reactivate": {
|
||||
"description": "Whether to skip ensuring the user is active upon being unlocked.",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UserEmailFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user