Update User
Update an existing team user's permissions and credentials.
Endpoint
POST /user/update
Authentication
Header | Value |
---|---|
Authorization | Bearer <jwt_token> |
Content-Type | application/json |
Request Body
Field | Type | Required | Description |
---|---|---|---|
username | string | ✅ | Username of the team user to update |
password | string | ✅ | New password for the team user |
permissions | object | ✅ | Updated permission settings for different resources |
Permissions Object Structure
Resource | Type | Description |
---|---|---|
apps | object | Permissions for application management |
channels | object | Permissions for channel management |
platforms | object | Permissions for platform management |
archs | object | Permissions for architecture management |
Permission Fields for Each Resource
Field | Type | Description |
---|---|---|
create | boolean | Permission to create new resources |
delete | boolean | Permission to delete resources |
edit | boolean | Permission to edit existing resources |
download | boolean | Permission to download files (apps only) |
upload | boolean | Permission to upload files (apps only) |
allowed | array | List of resource IDs the user has access to |
Example Request
curl -X POST \
'http://localhost:9000/user/update' \
-H 'Authorization: Bearer <jwt_token>' \
-H 'Content-Type: application/json' \
-d '{
"username": "teamuser1",
"password": "password1234",
"permissions": {
"apps": {
"create": false,
"delete": true,
"edit": true,
"download": true,
"upload": true,
"allowed": ["", ""]
},
"channels": {
"create": true,
"delete": true,
"edit": true,
"allowed": [""]
},
"platforms": {
"create": true,
"delete": false,
"edit": true,
"allowed": [""]
},
"archs": {
"create": true,
"delete": false,
"edit": true,
"allowed": [""]
}
}
}'
Response
Success Response (200 OK)
{
"message": "Team user updated successfully"
}
Response Fields
Field | Type | Description |
---|---|---|
message | string | Confirmation message indicating successful user update |
Notes
- Only admin users can update team user permissions
- Password changes take effect immediately
- Permission changes affect the user's access rights immediately
- The
allowed
array can be updated to grant or revoke access to specific resources