[go: up one dir, main page]

Skip to content

Fix automate/agents path when not logged in

What does this MR do and why?

Fix automate/agents path when not logged in

If the project was public, this would cause an exception.

Visiting https://gitlab.com/gitlab-org/gitlab/-/automate/agents when not logged in will cause a 500 error. This changes it to a 404.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Visit http://gdk.test:3000/gitlab-duo/test/-/automate/agents when not logged in
  2. Confirm you get a 404
  3. Disable Duo features for the project: Project.find_by_full_path("gitlab-duo/test").project_setting.update!(duo_features_enabled: false)
  4. You should now again get a 404 error.
  5. Enable Duo features for the project: Project.find_by_full_path("gitlab-duo/test").project_setting.update!(duo_features_enabled: trui)
  6. Try again on master, and you'll get a 500 when not logged in.

MR acceptance checklist

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

Edited by Keeyan Nejad

Merge request reports

Loading