-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Describe the bug
I have problems with setting the user config.
I set up the user settings:
# 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.
Metadata
Metadata
Assignees
Labels
No labels