CP-44368 workaround: do not CFU on connection if the users are less privileged than pool operator.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2023-08-04 14:36:31 +01:00
parent f5e535cc2b
commit 9e25970850

View File

@ -1084,7 +1084,9 @@ namespace XenAdmin
if (YumRepoNotConfiguredAlert.TryCreate(connection, out var alert) || OutOfSyncWithCdnAlert.TryCreate(connection, out alert))
Alert.AddAlert(alert);
Updates.CheckForCdnUpdates(coordinator.Connection);
if (connection.Session.IsLocalSuperuser || connection.Session.Roles.Any(r =>
r.name_label == Role.MR_ROLE_POOL_OPERATOR || r.name_label == Role.MR_ROLE_POOL_ADMIN))
Updates.CheckForCdnUpdates(coordinator.Connection);
}
else
{