You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
User settings in EX_APP do not work correctly #393
# Register personal (user) settings
PERSONAL_SETTINGS = SettingsForm(
id="context_agent_personal_form",
section_type="personal",
section_id="ai_integration_team",
title=_("Context Agent Preferences"),
description=_("Personal preferences for Context Agent."),
fields=[
SettingsField(
id="context_agent___mcp_config",
title=_("MCP Config"),
description=_(
'JSON configuration for the MCP. Structured as {"service_name": {"url": "https://service.url","transport": "streamable_http"}}. For more details view the documentation for context_agent.'
),
type=SettingsFieldType.TEXT,
default="",
placeholder='{"weather": {"url": "https://weather.internet/mcp","transport": "streamable_http"}}',
),
],
)
I add them to the enabled_handler():
nc.ui.settings.register_form(PERSONAL_SETTINGS)
And the user can see the config indeed, but when tries to modify the value, the browser console shows 403...
When I set the value in the table oc_preferences_ex they are correctly visible in that setting. Only "writing" from browser does not work correctly.
Unfortunately there is no single other ex_app which sets user settings, so I am unable to confirm that my code is correct, but I suspect it's a bug in nextcloud routing.
Steps/Code to Reproduce
Expected Results
Actual Results
Setup configuration
I initially reported it in an other app ( nextcloud/context_agent#105 ) , but I think it's the bug in nc_py_api.
fwiw I'm also trying to solve issues with settings in my ExApp at the moment. Interestingly I'm not having the same problem as you (403 on edit) - instead I'm not seeing anything being persisted at all when changing the settings. get_values([]) returns an empty list.
Otherwise from looking at your code it seems we're doing the same thing wrt personal/preferences_ex.
Activity
oleksandr-nc commentedon Mar 27, 2026
Thanks for reporting this, looks like this is an issue in the AppAPI..
troed commentedon Apr 14, 2026
fwiw I'm also trying to solve issues with settings in my ExApp at the moment. Interestingly I'm not having the same problem as you (403 on edit) - instead I'm not seeing anything being persisted at all when changing the settings. get_values([]) returns an empty list.
Otherwise from looking at your code it seems we're doing the same thing wrt personal/preferences_ex.
troed commentedon Apr 20, 2026
I found my issue, investigation and solution documented here: https://help.nextcloud.com/t/unable-to-persist-exapp-settings/243474
I do think there's a bug behind why it's like that, but I don't know the internals of nc_py_api and AppAPI well enough to claim where it is.