From 8117bf8603527e570a802c8496d78ac760ca6dd4 Mon Sep 17 00:00:00 2001 From: tarmst Date: Mon, 6 Jan 2025 18:23:42 +0000 Subject: [PATCH] Add admin check --- backend/open_webui/utils/oauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index c76a1453b..bfcf22034 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -314,7 +314,7 @@ class OAuthManager: 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( user=user, user_data=user_data,