mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #15985] [CLOSED] feat: add support access_control field on folder, like knowledge #23999
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/15985
Author: @blitzh
Created: 7/24/2025
Status: ❌ Closed
Base:
dev← Head:custom-dev📝 Commits (7)
70c6c7atstba52b36aman92bd0f6detele env localf37b901add folder to user access_control2768e9badd accessControl in folder02051d0fix access control at foldera5adcc3add gitignore📊 Changes
24 files changed (+96 additions, -46 deletions)
View changed files
📝
.gitignore(+2 -0)➕
backend/.python-version(+1 -0)📝
backend/dev.sh(+1 -1)📝
backend/open_webui/models/folders.py(+52 -13)📝
backend/open_webui/routers/folders.py(+5 -1)➖
backend/open_webui/static/apple-touch-icon.png(+0 -0)➖
backend/open_webui/static/custom.css(+0 -0)➖
backend/open_webui/static/favicon-96x96.png(+0 -0)➖
backend/open_webui/static/favicon-dark.png(+0 -0)➖
backend/open_webui/static/favicon.ico(+0 -0)➖
backend/open_webui/static/favicon.png(+0 -0)➖
backend/open_webui/static/favicon.svg(+0 -3)➖
backend/open_webui/static/loader.js(+0 -0)➖
backend/open_webui/static/logo.png(+0 -0)➖
backend/open_webui/static/site.webmanifest(+0 -21)➖
backend/open_webui/static/splash-dark.png(+0 -0)➖
backend/open_webui/static/splash.png(+0 -0)➖
backend/open_webui/static/user-import.csv(+0 -1)➖
backend/open_webui/static/web-app-manifest-192x192.png(+0 -0)➖
backend/open_webui/static/web-app-manifest-512x512.png(+0 -0)...and 4 more files
📄 Description
feat: add support access_control field on folder, like knowledge
Description
This pull request adds support for the
access_controlfield when creating folders. Previously, folder permissions were hardcoded to default values (e.g. current user only), and anyaccess_controlprovided by the frontend was ignored.With this change:
access_controlstructure (includingreadandwritegroups/users)access_controlis not specifiedThis is useful for controlling folder-level visibility across users and groups, supporting upcoming multi-user scenarios and group-based sharing in the Open WebUI interface.
Changelog
Added
access_control(type: JSON) added tofolderstableaccess_controlinFolderFormPydantic modelinsert_new_folder()updated to store frontend-provided access controlsChanged
form_data.access_controlif available during folder creationFixed
access_controlwas always default, even if provided by the frontendNo Alembic migration is included in this PR — please add the column manually depending on your DB engine:
Database Migration
Ensure the
folderstable has a new column added:Or if using SQLite:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.