mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-08 02:01:07 -05:00
[PR #13466] [CLOSED] feat: Add Playground Access Control - Permission Setting #38836
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/13466
Author: @Classic298
Created: 5/3/2025
Status: ❌ Closed
Base:
dev← Head:dev📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.feat: Add Playground Access Control
Description
Related issues / discussions:
This PR introduces a new permission setting,
playground_access, under "Features Permissions" to control user access to the Playground feature (/playground). Administrators can now manage this access instance-wide via Default Permissions or on a per-group basis within the Admin Panel.By default, Playground access is disabled (
false) for non-admin users but can be enabled via these new settings. Administrators always retain access to the Playground regardless of the permission setting.Changelog Entry
Added
playground_accessto thefeaturessection of user permissions.USER_PERMISSIONS_FEATURES_PLAYGROUND_ACCESSto configure the default value forplayground_access(defaults toFalse).src/lib/components/admin/Users/Groups/Permissions.svelte).src/routes/(app)/playground/+layout.svelte) checking for admin role orplayground_accesspermission."Playground Access"added, with German translation provided.Changed
src/lib/components/layout/Sidebar/UserMenu.svelte) is now conditionally displayed based on admin role orplayground_accesspermission.backend/open_webui/config.py) updated to include and process theUSER_PERMISSIONS_FEATURES_PLAYGROUND_ACCESSvariable and addplayground_accesstoDEFAULT_USER_PERMISSIONS.backend/open_webui/routers/users.py) updated via Pydantic model (FeaturesPermissions) to includeplayground_access.Permissions.svelte,EditGroupModal.svelte,Groups.svelte) updated to includeplayground_access.Security
/playgroundroutes.Additional Information
adminrole will always have access to the Playground, irrespective of theplayground_accesspermission setting./playground./playgroundto the homepage '/'.Screenshots or Videos
Please excuse the poor video quality and the suboptimal presentation, but the video does showcase how it works and that it works:
https://github.com/user-attachments/assets/9b865f16-2beb-4442-ab9b-cfb7935181d0
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the CONTRIBUTOR_LICENSE_AGREEMENT, 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.