mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #5121] [CLOSED] Feat: Add Content admin role #8422
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/5121
Author: @MarcRevo
Created: 9/3/2024
Status: ❌ Closed
Base:
main← Head:dev-content-admin📝 Commits (10+)
8994728Update translation.json6589450Merge pull request #4954 from open-webui/main0525dd2feat: support Literal type in Tools30e03cbAdd robots.txt to fix validation error718d69bAdd meta description22117e0A11y: Buttons do not have an accessible name7e1923fAdd searchapi as an alternative web searchfd16129Update color theme on system change2706b8ci18n: Update Catalan translation.jsona7b6d55i18n: Update Catalan translation.json📊 Changes
86 files changed (+1217 additions, -1071 deletions)
View changed files
📝
.github/workflows/release-pypi.yml(+1 -0)📝
README.md(+1 -1)📝
backend/apps/audio/main.py(+19 -32)📝
backend/apps/images/main.py(+23 -35)📝
backend/apps/images/utils/comfyui.py(+27 -12)📝
backend/apps/ollama/main.py(+19 -33)📝
backend/apps/openai/main.py(+21 -29)📝
backend/apps/rag/main.py(+108 -110)📝
backend/apps/rag/search/brave.py(+2 -2)📝
backend/apps/rag/search/duckduckgo.py(+2 -1)📝
backend/apps/rag/search/google_pse.py(+2 -3)📝
backend/apps/rag/search/jina_search.py(+3 -3)📝
backend/apps/rag/search/main.py(+3 -1)➕
backend/apps/rag/search/searchapi.py(+49 -0)📝
backend/apps/rag/search/searxng.py(+2 -3)📝
backend/apps/rag/search/serper.py(+2 -2)📝
backend/apps/rag/search/serply.py(+2 -3)📝
backend/apps/rag/search/serpstack.py(+2 -3)📝
backend/apps/rag/search/tavily.py(+1 -2)➕
backend/apps/rag/search/testdata/searchapi.json(+383 -0)...and 66 more files
📄 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.
https://github.com/open-webui/open-webui/discussions/5120
Changelog Entry
Description
This pull request introduces a new user role, "content admin," and updates the system to accommodate this role. The "content admin" role has specific permissions, including the ability to manage documents.
Added
Changed
backend/apps/webui/routers/auths.py: Updated role handling logic to include "content admin" in configuration.backend/apps/webui/routers/chats.py: Adjusted chat access permissions to accommodate "content admin."backend/apps/webui/routers/documents.py: Modified API endpoints to manage document access and permissions for the "content admin" role.backend/test/apps/webui/routers/test_auths.py: Updated test cases to reflect changes in role handling.backend/utils/utils.py: Introduced utility functions to support the new role and permissions.-
src/lib/components/admin/AddUserModal.svelte: Added support for selecting "content admin" role.-
src/lib/components/admin/Settings/General.svelte: Added "content admin" option in role selection dropdown.-
src/lib/components/layout/Sidebar.svelte: Updated sidebar to show content admin specific links and options.-
src/routes/(app)/+layout.svelte: Updated layout logic to include the new role in routing and access control.-
src/routes/(app)/admin/+page.svelte: Enhanced user role handling to include "content admin" in role-based views.-
src/routes/(app)/workspace/+layout.svelte: Improved layout to handle role-based access for "content admin."Deprecated
Removed
Fixed
Security
Breaking Changes
Screenshots or Videos
https://github.com/user-attachments/assets/62b9fed2-b570-41b4-b1b9-1b87665014db
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.