Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/projects/ml/experiments_helper.rb')
-rw-r--r--app/helpers/projects/ml/experiments_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/projects/ml/experiments_helper.rb b/app/helpers/projects/ml/experiments_helper.rb
index 7aef208447a..d5b2c3cd36a 100644
--- a/app/helpers/projects/ml/experiments_helper.rb
+++ b/app/helpers/projects/ml/experiments_helper.rb
@@ -14,12 +14,12 @@ module Projects
Gitlab::Json.generate(data)
end
- def candidates_table_items(candidates)
+ def candidates_table_items(candidates, user)
items = candidates.map do |candidate|
{
**candidate.params.to_h { |p| [p.name, p.value] },
**candidate.latest_metrics.to_h { |m| [m.name, number_with_precision(m.value, precision: 4)] },
- ci_job: job_info(candidate),
+ ci_job: job_info(candidate, user),
artifact: link_to_artifact(candidate),
details: link_to_details(candidate),
name: candidate.name,
@@ -72,8 +72,8 @@ module Projects
project_ml_candidate_path(candidate.project, candidate.iid)
end
- def job_info(candidate)
- return unless candidate.from_ci?
+ def job_info(candidate, user)
+ return unless candidate.from_ci? && can?(user, :read_build, candidate.ci_build)
build = candidate.ci_build