mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[PR #20462] [MERGED] feat: Memories Feature Toggle & Granular Permissions #112945
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/20462
Author: @silentoplayz
Created: 1/7/2026
Status: ✅ Merged
Merged: 1/7/2026
Merged by: @tjbck
Base:
dev← Head:feat/memories-permission📝 Commits (1)
363808ffeat: implement global memories toggle and permissions📊 Changes
10 files changed (+152 additions, -5 deletions)
View changed files
📝
backend/open_webui/config.py(+11 -0)📝
backend/open_webui/main.py(+3 -0)📝
backend/open_webui/routers/auths.py(+4 -0)📝
backend/open_webui/routers/memories.py(+99 -4)📝
backend/open_webui/routers/users.py(+1 -0)📝
src/lib/components/admin/Settings/General.svelte(+8 -0)📝
src/lib/components/admin/Users/Groups/Permissions.svelte(+16 -0)📝
src/lib/components/chat/SettingsModal.svelte(+7 -0)📝
src/lib/constants/permissions.ts(+2 -1)📝
src/lib/stores/index.ts(+1 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.
This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
Description
Implemented a robust feature toggle system for "Memories". This PR introduces a global On/Off switch for the Memories feature in the Admin Settings, as well as granular permission controls for individual user roles. It ensures that when the feature is disabled globally, all related UI elements (including the Personalization tab) are hidden for all users, including admins.
Added
ENABLE_MEMORIESconfiguration and a corresponding UI toggle in Admin > Settings > General > Features.enable_memoriesin the/api/configendpoint to allow the frontend to react to the global state.Changed
SettingsModal.svelteto conditionally hide the "Personalization" (Memories) tab based on the globalenable_memoriesconfig.memories.pyto enforce both the globalENABLE_MEMORIEScheck and the granularfeatures.memoriespermission on all endpoints.Security
/api/v1/memories/*) if the feature is disabled globally or if the user lacks the specific permission.Additional Information
This change ensures that "Memories" follows the same configuration pattern as other major features like Image Generation and Web Search, providing consistent administrative control.
This change addresses the community request to allow administrators to fully disable the Memories feature, as discussed in Discussion #17018.
This PR implements precisely that capability, along with granular control for those who want to enable it selectively.
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.