mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #19055] feat: Admins setting custom default interface settings #11874
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/19055
Author: @Classic298
Created: 11/8/2025
Status: 🔄 Open
Base:
dev← Head:admin-interface-settings-users📝 Commits (3)
7ee9b00Implement message cleaning before API callb2efa7bClaude/admin UI settings control 011 c uw3 uvo a ejtxwunu4i d1r (#26)8fde4b8Update Chat.svelte📊 Changes
13 files changed (+627 additions, -73 deletions)
View changed files
📝
backend/open_webui/models/groups.py(+3 -1)📝
backend/open_webui/routers/configs.py(+42 -0)📝
backend/open_webui/routers/users.py(+52 -0)📝
src/lib/apis/configs/index.ts(+57 -0)📝
src/lib/apis/users/index.ts(+27 -0)📝
src/lib/components/admin/Settings/Interface.svelte(+147 -0)➕
src/lib/components/admin/Settings/Interface/InterfaceDefaultsModal.svelte(+155 -0)📝
src/lib/components/admin/Users/Groups/EditGroupModal.svelte(+18 -3)📝
src/lib/components/admin/Users/Groups/Permissions.svelte(+27 -1)📝
src/lib/components/chat/Chat.svelte(+15 -14)📝
src/lib/components/chat/Settings/Interface.svelte(+57 -51)📝
src/lib/components/chat/SettingsModal.svelte(+9 -0)📝
src/routes/(app)/+layout.svelte(+18 -3)📄 Description
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
Description
This PR implements admin control for interface settings with global defaults, permission-based access control, and user reset functionality. Admins can now configure default interface settings (chat bubble, wide screen, RTL, etc.) that apply to all users, while maintaining granular control over which user groups can modify these settings.
Key Features:
Architectural Decisions:
Testing conducted
All functional tests completed successfully:
Test 1: Admin Setting Interface Defaults (1.1-1.6)
✅ 1.1: Admin can open Interface Defaults modal from Admin Settings
✅ 1.2: Admin can configure interface defaults (Chat Bubble OFF, Wide Screen ON, Chat Direction RTL)
✅ 1.3: Defaults save successfully
✅ 1.4: Defaults persist after page refresh
✅ 1.5: Reopening modal displays current admin-configured values
✅ 1.6: Admin can modify existing defaults
Test 2: New User Receiving Admin Defaults (2.1-2.6)
✅ 2.1: Brand new user receives admin-configured defaults on first login
✅ 2.2: User can customize their own interface settings
✅ 2.3: Disabling "Interface Settings Access" permission persists correctly
✅ 2.4: User with disabled permission cannot see Interface Settings tab
✅ 2.5: User without permission still uses admin defaults for UI behavior
✅ 2.6: Re-enabling permission restores Interface Settings tab access
Test 3: User Reset Functionality (3.1-3.3)
✅ 3.1: Reset button reverts settings to admin-configured defaults
✅ 3.2: Reset confirmation dialog works correctly
✅ 3.3: UI immediately updates after reset
Test 4: Fallback Logic (4.1-4.4)
✅ 4.1: User custom settings take precedence over admin defaults
✅ 4.2: Admin defaults apply when user has no custom settings
✅ 4.3: System defaults apply when no admin defaults configured
✅ 4.4: Fallback chain maintains correct priority
Test 5: Group Permissions (5.1-5.4)
✅ 5.1: Interface Settings Access permission toggles correctly in group editor
✅ 5.2: Permission persists after closing/reopening group editor
✅ 5.3: Users in group with disabled permission cannot access Interface Settings
✅ 5.4: Users in multiple groups inherit most permissive setting
Test 6: Default User Permissions (6.1-6.3)
✅ 6.1: Interface Settings Access permission available in default permissions editor
✅ 6.2: Disabling default permission affects all new users
✅ 6.3: Changes to default permissions persist across server restarts
Test 7: Backward Compatibility (7.1-7.3)
✅ 7.1: Existing users without explicit permission have full access (default true)
✅ 7.2: Existing custom user settings preserved and take precedence
✅ 7.3: System works correctly without admin defaults configured
Test 8: Edge Cases (8.1-8.4)
✅ 8.1: Empty admin defaults handled gracefully
✅ 8.2: Partial admin defaults merge correctly with system defaults
✅ 8.3: Malformed settings data doesn't crash the UI
✅ 8.4: Rapid permission toggling doesn't cause race conditions
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.