Add UserFilter in UpdateHostInstallProgress
@@ -1732,7 +1732,7 @@ func (b *bareMetalInventory) GetCredentials(ctx context.Context, params installe
func (b *bareMetalInventory) UpdateHostInstallProgress(ctx context.Context, params installer.UpdateHostInstallProgressParams) middleware.Responder {
log := logutil.FromContext(ctx, b.log)
var host models.Host
- if err := b.db.First(&host, "id = ? and cluster_id = ?", params.HostID, params.ClusterID).Error; err != nil {
+ if err := b.db.First(&host, identity.AddUserFilter(ctx, "id = ? and cluster_id = ?"), params.HostID, params.ClusterID).Error; err != nil {
log.WithError(err).Errorf("failed to find host %s", params.HostID)
return installer.NewUpdateHostInstallProgressNotFound().
WithPayload(common.GenerateError(http.StatusNotFound, err))
