Fix permissions toggles not saving in EditGroupModal#59
Merged
Classic298 merged 4 commits intoworkspace-permissionsfrom Nov 17, 2025
Merged
Conversation
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
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.