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
- Visit http://gdk.test:3000/gitlab-duo/test/-/automate/agents when not logged in
- Confirm you get a 404
- Disable Duo features for the project:
Project.find_by_full_path("gitlab-duo/test").project_setting.update!(duo_features_enabled: false)
- You should now again get a 404 error.
- Enable Duo features for the project:
Project.find_by_full_path("gitlab-duo/test").project_setting.update!(duo_features_enabled: trui)
- 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