Add admin check

This commit is contained in:
tarmst 2025-01-06 18:23:42 +00:00
parent 15a182c9d6
commit 8117bf8603

View File

@ -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,