mirror of
https://github.com/open-webui/open-webui
synced 2025-02-23 13:51:07 +00:00
Merge pull request #9163 from rragundez/default-role
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Some checks are pending
Deploy to HuggingFace Spaces / check-secret (push) Waiting to run
Deploy to HuggingFace Spaces / deploy (push) Blocked by required conditions
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Waiting to run
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Waiting to run
Create and publish Docker images with specific build args / merge-main-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-cuda-images (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge-ollama-images (push) Blocked by required conditions
Python CI / Format Backend (3.11) (push) Waiting to run
Frontend Build / Format & Build Frontend (push) Waiting to run
Frontend Build / Frontend Unit Tests (push) Waiting to run
Bug fix, configurable default if using oauth via the `DEFAULT_USER_ROLE` env variable
This commit is contained in:
commit
9b640b0ac2
@ -82,7 +82,8 @@ class OAuthManager:
|
|||||||
oauth_allowed_roles = auth_manager_config.OAUTH_ALLOWED_ROLES
|
oauth_allowed_roles = auth_manager_config.OAUTH_ALLOWED_ROLES
|
||||||
oauth_admin_roles = auth_manager_config.OAUTH_ADMIN_ROLES
|
oauth_admin_roles = auth_manager_config.OAUTH_ADMIN_ROLES
|
||||||
oauth_roles = None
|
oauth_roles = None
|
||||||
role = "pending" # Default/fallback role if no matching roles are found
|
# Default/fallback role if no matching roles are found
|
||||||
|
role = auth_manager_config.DEFAULT_USER_ROLE
|
||||||
|
|
||||||
# Next block extracts the roles from the user data, accepting nested claims of any depth
|
# Next block extracts the roles from the user data, accepting nested claims of any depth
|
||||||
if oauth_claim and oauth_allowed_roles and oauth_admin_roles:
|
if oauth_claim and oauth_allowed_roles and oauth_admin_roles:
|
||||||
|
Loading…
Reference in New Issue
Block a user