Your question
I am using Stalwart’s JMAP management API to manage user accounts.
Updating quota works correctly:
json
{
“update”: {
“y”: {
“quotas/maxDiskQuota”: 20000
}
}
}
I would like to temporarily put an unpaid account on hold while still allowing the user to read existing email, calendars, and files.
My goal is to disable only the emailSend permission.
x:Account/get currently returns the account permissions as:
json
{
“permissions”: {
“@type”: “Inherit”
}
}
I tried updating the complete permissions object:
json
{
“update”: {
“y”: {
“permissions”: {
“@type”: “Merge”,
“disabledPermissions”: [
“emailSend”
]
}
}
}
}
This returns:
json
{
“type”: “invalidPatch”,
“description”: “Invalid value for object property”,
“properties”: [
“permissions/disabledPermissions”
]
}
I also tried the permission as email-send, with the same result.
Using an indexed object:
json
{
“permissions”: {
“@type”: “Merge”,
“disabledPermissions”: {
“0”: “emailSend”
}
}
}
returns:
json
{
“type”: “invalidPatch”,
“description”: “Invalid key for object property”,
“properties”: [
“permissions/disabledPermissions”
]
}
What is the correct x:Account/set JSON structure for changing an account from:
json
{
“permissions”: {
“@type”: “Inherit”
}
}
to a merged permission set with emailSend disabled?
Also, what is the correct request for restoring the account to inherited permissions afterward?
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on