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?
I can add the environment variables to the docs once you guys have taken a look at this and are good with it
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
No new dependencies
Testing: Have you written and run sufficient tests for validating the changes?
Tested locally, but did not write tests as I did not see other tests for oauth currently.
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?
I did not see any formatter specified anywhere, but will run one if you have one.
Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
feat: Introduces a new feature or enhancement to the codebase
Changelog Entry
Description
Added the ability to match user oauth groups to OpenWebUI groups with exactly the same names upon user login. This will also remove users from OpenWebUI groups if they are removed from an oauth group.
This can be enabled by using: 'ENABLE_OAUTH_GROUP_MANAGEMENT=true' in the docker compose file.
You can also change the name of the groups claim using OAUTH_GROUPS_CLAIM=groups_name.
Added
Added the ability to add users to OpenWebUI groups based on their oauth groups. This also works for groups that do not yet have saved permissions.
🔄 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/7923
**Author:** [@tarmst](https://github.com/tarmst)
**Created:** 12/17/2024
**Status:** ✅ Merged
**Merged:** 12/17/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `groups-from-oauth`
---
### 📝 Commits (2)
- [`9737869`](https://github.com/open-webui/open-webui/commit/9737869d11dc5f5a12009c7bc878c34cece46921) Adding oauth group management for users upon login
- [`0f33856`](https://github.com/open-webui/open-webui/commit/0f3385618243a091a995ccfce675916cebe96fb6) Removing prints used for debugging
### 📊 Changes
**2 files changed** (+65 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/config.py` (+12 -0)
📝 `backend/open_webui/utils/oauth.py` (+53 -0)
</details>
### 📄 Description
# 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.
Associated discussion post: https://github.com/open-webui/open-webui/issues/7102
**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?
- I can add the environment variables to the docs once you guys have taken a look at this and are good with it
- [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- No new dependencies
- [ ] **Testing:** Have you written and run sufficient tests for validating the changes?
- Tested locally, but did not write tests as I did not see other tests for oauth currently.
- [ ] **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?
- I did not see any formatter specified anywhere, but will run one if you have one.
- [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following:
- **feat**: Introduces a new feature or enhancement to the codebase
# Changelog Entry
### Description
Added the ability to match user oauth groups to OpenWebUI groups with exactly the same names upon user login. This will also remove users from OpenWebUI groups if they are removed from an oauth group.
This can be enabled by using: `'ENABLE_OAUTH_GROUP_MANAGEMENT=true'` in the docker compose file.
You can also change the name of the groups claim using `OAUTH_GROUPS_CLAIM=groups_name`.
### Added
- Added the ability to add users to OpenWebUI groups based on their oauth groups. This also works for groups that do not yet have saved permissions.
---
<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/7923
Author: @tarmst
Created: 12/17/2024
Status: ✅ Merged
Merged: 12/17/2024
Merged by: @tjbck
Base:
dev← Head:groups-from-oauth📝 Commits (2)
9737869Adding oauth group management for users upon login0f33856Removing prints used for debugging📊 Changes
2 files changed (+65 additions, -0 deletions)
View changed files
📝
backend/open_webui/config.py(+12 -0)📝
backend/open_webui/utils/oauth.py(+53 -0)📄 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 discussion post: https://github.com/open-webui/open-webui/issues/7102
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added the ability to match user oauth groups to OpenWebUI groups with exactly the same names upon user login. This will also remove users from OpenWebUI groups if they are removed from an oauth group.
This can be enabled by using:
'ENABLE_OAUTH_GROUP_MANAGEMENT=true'in the docker compose file.You can also change the name of the groups claim using
OAUTH_GROUPS_CLAIM=groups_name.Added
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.