mirror of
https://github.com/open-webui/open-webui
synced 2025-01-19 17:26:33 +00:00
Add admin check
This commit is contained in:
parent
15a182c9d6
commit
8117bf8603
@ -314,7 +314,7 @@ class OAuthManager:
|
|||||||
expires_delta=parse_duration(auth_manager_config.JWT_EXPIRES_IN),
|
expires_delta=parse_duration(auth_manager_config.JWT_EXPIRES_IN),
|
||||||
)
|
)
|
||||||
|
|
||||||
if auth_manager_config.ENABLE_OAUTH_GROUP_MANAGEMENT:
|
if auth_manager_config.ENABLE_OAUTH_GROUP_MANAGEMENT and user.role != "admin":
|
||||||
self.update_user_groups(
|
self.update_user_groups(
|
||||||
user=user,
|
user=user,
|
||||||
user_data=user_data,
|
user_data=user_data,
|
||||||
|
Loading…
Reference in New Issue
Block a user