Explorar o código

Add admin check

tarmst hai 1 ano
pai
achega
8117bf8603
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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,