Hide promote run to model version when no permission exists

What does this MR do and why?

Hide promote run to model version when no permission exists

References

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Go to any project, and "Analyze/Experiments.
  2. First create some experiments and runs as below on rails console
project = Project.find(34)
user = User.find_by_username('test4')

Ml::CreateModelService.new(project, "model_1", user).execute
m = ::Ml::Model.find_by(name: "model_1")
12.times { |i| Ml::CreateCandidateService.new(m.default_experiment, {user: user}).execute }
  1. Now enter an experiment and some runs, and see the "Promote run" menu button as in screenshot
  2. Open the same URL in incognito mode for a public project; and see you can see everything except the promote button
Edited by Alper Akgun

Merge request reports

Loading