Skip to content

Comments

Fix permissions toggles not saving in EditGroupModal#59

Merged
Classic298 merged 4 commits intoworkspace-permissionsfrom
claude/fix-permissions-toggles-01NM3GagVMqwqP4zCyWAPLnQ
Nov 17, 2025
Merged

Fix permissions toggles not saving in EditGroupModal#59
Classic298 merged 4 commits intoworkspace-permissionsfrom
claude/fix-permissions-toggles-01NM3GagVMqwqP4zCyWAPLnQ

Conversation

@Classic298
Copy link
Owner

No description provided.

The import/export permission toggles and notes-related permissions were not saving because they were missing from the default permissions object in EditGroupModal. When users toggled these switches, they were binding to undefined properties, causing the values not to persist when the modal was closed and reopened.

Added missing fields to the permissions object:
- workspace: models_import, models_export, prompts_import, prompts_export, tools_import, tools_export
- sharing: public_notes
- features: notes
…omponent

The DEFAULT_PERMISSIONS constant in Permissions.svelte was missing the new import/export permission fields (models_import, models_export, prompts_import, prompts_export, tools_import, tools_export). This caused the reactive fillMissingProperties function to not properly initialize these fields, preventing the toggles from saving correctly.

When a user toggled these switches, the values weren't properly tracked because the DEFAULT_PERMISSIONS object used in the reactive merge didn't include them.
The WorkspacePermissions Pydantic model was missing the new import/export permission fields, causing the backend to silently strip them out during validation when saving group permissions. This was the root cause of toggles not persisting.

Added missing fields to WorkspacePermissions:
- models_import
- models_export
- prompts_import
- prompts_export
- tools_import
- tools_export

These fields are used by both /users/default/permissions endpoint and group permissions storage. Without them in the Pydantic schema, any values sent from the frontend were being dropped during model validation.
The config.py was missing the environment variable constants and DEFAULT_USER_PERMISSIONS entries for the new import/export permissions:

Added constants:
- USER_PERMISSIONS_WORKSPACE_MODELS_IMPORT
- USER_PERMISSIONS_WORKSPACE_MODELS_EXPORT
- USER_PERMISSIONS_WORKSPACE_PROMPTS_IMPORT
- USER_PERMISSIONS_WORKSPACE_PROMPTS_EXPORT
- USER_PERMISSIONS_WORKSPACE_TOOLS_IMPORT
- USER_PERMISSIONS_WORKSPACE_TOOLS_EXPORT

Added to DEFAULT_USER_PERMISSIONS["workspace"]:
- models_import
- models_export
- prompts_import
- prompts_export
- tools_import
- tools_export

Without these, the config system couldn't properly load or save the new permission fields, causing them to be lost even if the Pydantic models accepted them.
@Classic298 Classic298 merged commit 05249ec into workspace-permissions Nov 17, 2025
@Classic298 Classic298 deleted the claude/fix-permissions-toggles-01NM3GagVMqwqP4zCyWAPLnQ branch November 17, 2025 21:58
Classic298 added a commit that referenced this pull request Nov 18, 2025
…n-webui#19242)

* feat: add granular import/export permissions for workspace items (#55)

Co-authored-by: Claude <[email protected]>

* Fix permissions toggles not saving in EditGroupModal (#58)

Co-authored-by: Claude <[email protected]>

* Fix permissions toggles not saving in EditGroupModal (#59)

Co-authored-by: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants