Browse Source

Add admin check

tarmst 4 months ago
parent
commit
8117bf8603
1 changed files with 1 additions and 1 deletions
  1. 1 1
      backend/open_webui/utils/oauth.py

+ 1 - 1
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,