mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #17848] [MERGED] Feat/chore: Add warning for conflicting group permissions / Refactored Permissions.svelte #47621
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/17848
Author: @Classic298
Created: 9/28/2025
Status: ✅ Merged
Merged: 9/29/2025
Merged by: @tjbck
Base:
dev← Head:feat/group-permission-warning📝 Commits (6)
30550d9Feat: Add warning for conflicting group permissionsfb3eeaaUpdate Groups.sveltea4e0c10Delete src/lib/components/admin/Users/Groups/PermissionSwitch.sveltead9cae3Delete src/lib/components/icons/ExclamationTriangle.svelte67b3929Delete src/lib/components/common/Warning.sveltecf20f04Update Permissions.svelte📊 Changes
4 files changed (+449 additions, -315 deletions)
View changed files
📝
src/lib/components/admin/Users/Groups.svelte(+11 -51)📝
src/lib/components/admin/Users/Groups/EditGroupModal.svelte(+2 -1)📝
src/lib/components/admin/Users/Groups/GroupItem.svelte(+2 -0)📝
src/lib/components/admin/Users/Groups/Permissions.svelte(+434 -263)📄 Description
Add warning for conflicting group permissions
Problem
When group permissions are disabled but the default "user" role has them enabled, the disabled settings have no effect due to additive permission inheritance. This creates confusion for administrators.
Solution
Adds visual warnings when a group permission is disabled but remains enabled in the default "user" role, explaining that the restriction won't take effect.
Large Refactor Justification
The
Permissions.sveltefile had 50+ repetitive Switch components with identical boilerplate. To add warning logic without massive code duplication, I created a reusablePermissionSwitchcomponent that:Technical Changes
PermissionSwitch.sveltewith built-in warning logicWarning.svelteandExclamationTriangle.sveltecomponentsgetUserDefaultPermissionsimport causing ReferenceErrorThe refactor pays down technical debt while delivering the core warning feature. The large diff reflects consolidating repetitive code, not scope creep.
Screenshots or Videos
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.