mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #8470] [MERGED] feat: Add toggle to read/write perms on access control #9028
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/8470
Author: @tarmst
Created: 1/10/2025
Status: ✅ Merged
Merged: 1/14/2025
Merged by: @tjbck
Base:
dev← Head:add-read-write-toggle-to-access-control📝 Commits (1)
49eca68Add toggle to read/write perms on access control📊 Changes
5 files changed (+39 additions, -7 deletions)
View changed files
📝
backend/open_webui/routers/knowledge.py(+2 -2)📝
backend/open_webui/routers/prompts.py(+3 -2)📝
backend/open_webui/routers/tools.py(+2 -1)📝
src/lib/components/workspace/Models.svelte(+7 -1)📝
src/lib/components/workspace/common/AccessControl.svelte(+25 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Associated but slightly different discussion post: https://github.com/open-webui/open-webui/discussions/8373
Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the
devbranch.Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests for validating the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
Changelog Entry
Description
Adding the ability for users who create private models/knowledge/prompts/tools in the workspace to also choose which groups can modify the created model/knowledge/prompt/tool. The user can only choose between groups they are already in. This change allows users to allow others to edit their custom data, while still maintaining the read-only aspects by default.
Added
Adding the ability for users who create private models/knowledge/prompts/tools in the workspace to also choose which groups can modify the created model/knowledge/prompt/tool.
Screenshots or Videos
Walk-through example:
Users t2 and t3 are in the group "multi-edit-test" together, with all workspace permissions:

User t3 decides to create a knowledge(can also be a model, prompt or tool) and share it to the group "multi-edit-test", with only read access (the default):
User t2 cannot see the knowledge but can use it when making a model:

User t3 decides to make the knowledge writeable by the group by clicking the "read" badge:

User t2 can now see the knowledge in the workspace and edit it, as well as use it in models:

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.