Преглед изворни кода

Merge pull request #3113 from gravitl/master

Master
Abhishek K пре 1 година
родитељ
комит
fe101da6c9
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      pro/remote_access_client.go

+ 4 - 1
pro/remote_access_client.go

@@ -47,7 +47,10 @@ func racAutoDisableHook() error {
 			continue
 		}
 		for _, client := range clients {
-			if (client.OwnerID == user.UserName) && !user.IsAdmin && !user.IsSuperAdmin && client.Enabled {
+			if (client.OwnerID == user.UserName) &&
+				user.PlatformRoleID != models.SuperAdminRole &&
+				user.PlatformRoleID != models.AdminRole &&
+				client.Enabled {
 				slog.Info(fmt.Sprintf("disabling ext client %s for user %s due to RAC autodisabling", client.ClientID, client.OwnerID))
 				if err := disableExtClient(&client); err != nil {
 					slog.Error("error disabling ext client in RAC autodisable hook", "error", err)