feat: allow reassigning guests to actual users

This commit is contained in:
2026-04-01 09:03:06 +03:00
parent a1d2791d1c
commit ca109dc7fc
13 changed files with 1458 additions and 5 deletions

View File

@@ -825,6 +825,137 @@
}
}
},
"/ocs/v2.php/apps/forum/api/admin/guests/reassign": {
"post": {
"operationId": "admin-reassign-guest-posts",
"summary": "Reassign all posts and threads from a guest to a registered user",
"tags": [
"admin"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"guestAuthorId",
"targetUserId"
],
"properties": {
"guestAuthorId": {
"type": "string",
"description": "The guest author ID (format: \"guest:<token>\")"
},
"targetUserId": {
"type": "string",
"description": "The target Nextcloud user ID to assign posts to"
}
}
}
}
}
},
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "Posts reassigned successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"required": [
"success",
"postsReassigned",
"threadsReassigned"
],
"properties": {
"success": {
"type": "boolean"
},
"postsReassigned": {
"type": "integer",
"format": "int64"
},
"threadsReassigned": {
"type": "integer",
"format": "int64"
}
}
}
}
}
}
}
}
}
},
"401": {
"description": "Current user is not logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/apps/forum/api/bbcodes": {
"get": {
"operationId": "bb_code-index",