Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the dev branch.
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 to validate 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 clearly categorize this pull request, prefix the pull request title using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
Group management varies between OAuth, LDAP, and trusted header authentication methods leading to lack of features depending on which auth model the deployment is using.
Added
Added the ability to create groups when using trusted header authentication
Changed
Create a single util class that will create a standard approach for group management during log in attempts
Create a generic set of config values for use in the new group util:
ENABLE_GROUP_MANAGEMENT
If false then group management is not performed
ENABLE_GROUP_CREATION
If false then unrecognized groups will not be created.
BLOCKED_GROUPS
A list of groups that will not be sync'ed with the application
Deprecated
This code change deprecates the following configuration values
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.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/18018
**Author:** [@cmbaatz](https://github.com/cmbaatz)
**Created:** 10/2/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `main`
---
### 📝 Commits (2)
- [`45330d8`](https://github.com/open-webui/open-webui/commit/45330d8ff36dbe0d58c94c54ff658e2a411a24ba) Feat #18016
- [`b706515`](https://github.com/open-webui/open-webui/commit/b706515c622e1c9f5f29aafb463f798a8bdf386f) Feat #18016
### 📊 Changes
**7 files changed** (+8635 additions, -8000 deletions)
<details>
<summary>View changed files</summary>
📝 `CHANGELOG.md` (+1 -0)
📝 `backend/open_webui/config.py` (+3539 -3515)
📝 `backend/open_webui/main.py` (+2079 -2075)
📝 `backend/open_webui/routers/auths.py` (+1066 -1072)
➕ `backend/open_webui/test/utils/test_group.py` (+440 -0)
➕ `backend/open_webui/utils/group.py` (+294 -0)
📝 `backend/open_webui/utils/oauth.py` (+1216 -1338)
</details>
### 📄 Description
Standardizing group management code.
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [X] **Testing:** Have you written and run sufficient tests to validate the changes?
- [X] **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?
- [X] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
Group management varies between OAuth, LDAP, and trusted header authentication methods leading to lack of features depending on which auth model the deployment is using.
### Added
- Added the ability to create groups when using trusted header authentication
### Changed
1. Create a single util class that will create a standard approach for group management during log in attempts
2. Create a generic set of config values for use in the new group util:
1. ENABLE_GROUP_MANAGEMENT
If false then group management is not performed
1. ENABLE_GROUP_CREATION
If false then unrecognized groups will not be created.
1. BLOCKED_GROUPS
A list of groups that will not be sync'ed with the application
### Deprecated
This code change deprecates the following configuration values
1. ENABLE_OAUTH_GROUP_MANAGEMENT
1. ENABLE_OAUTH_GROUP_CREATION
1. OAUTH_BLOCKED_GROUPS
1. ENABLE_LDAP_GROUP_MANAGEMENT
1. ENABLE_LDAP_GROUP_CREATION
### Removed
- None
### Fixed
- FEAT: #18016
### Security
None
### Breaking Changes
None
---
### Additional Information
None
### Screenshots or Videos
None
### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18018
Author: @cmbaatz
Created: 10/2/2025
Status: ❌ Closed
Base:
dev← Head:main📝 Commits (2)
45330d8Feat [GH-ISSUE #16707] feat: Use chat language for follow-ups (#18016)b706515Feat [GH-ISSUE #16707] feat: Use chat language for follow-ups (#18016)📊 Changes
7 files changed (+8635 additions, -8000 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
backend/open_webui/config.py(+3539 -3515)📝
backend/open_webui/main.py(+2079 -2075)📝
backend/open_webui/routers/auths.py(+1066 -1072)➕
backend/open_webui/test/utils/test_group.py(+440 -0)➕
backend/open_webui/utils/group.py(+294 -0)📝
backend/open_webui/utils/oauth.py(+1216 -1338)📄 Description
Standardizing group management code.
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Group management varies between OAuth, LDAP, and trusted header authentication methods leading to lack of features depending on which auth model the deployment is using.
Added
Changed
If false then group management is not performed
If false then unrecognized groups will not be created.
A list of groups that will not be sync'ed with the application
Deprecated
This code change deprecates the following configuration values
Removed
Fixed
Security
None
Breaking Changes
None
Additional Information
None
Screenshots or Videos
None
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.