Skip to content

Commit

Permalink
Merge pull request #3110 from gravitl/hotfix/release-v0.25.0/rac-auto…
Browse files Browse the repository at this point in the history
…-disable

fix: user platform role check in rac auto disable
  • Loading branch information
abhishek9686 committed Sep 9, 2024
2 parents 1ae8900 + f0b5fef commit e3c3a27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pro/remote_access_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e3c3a27

Please sign in to comment.