Backend: Ensure detailed Error Message displayed when auditor accesses jobs in debug mode
Problem to solve
Per our docs
Auditor users are able to have ... read-only access to all other resources, except the Admin Area [and Settings].
See &7469 for more details.
Auditor cannot always see job logs.
This is happening when CI_DEBUG_TRACE is set to true on the GitLab side and it should be showing a more detailed error message that explains that the user cannot see the log due to the logs having debug mode set to true.
Example
See https://gitlab.com/gitlab-com/support/support-team-meta/-/issues/3143#note_635315966 and links in thread: #351607 (comment 1034595718)
Expected behaviour
Auditor see the message from here: https://gitlab.com/gitlab-org/gitlab/-/blob/6ec2244f2a571c0514ccacae1df56b8b1f47f0e1/app/controllers/projects/application_controller.rb#L39
Implementation Guide
Ensure that Auditors see the message in https://gitlab.com/gitlab-org/gitlab/-/blob/6ec2244f2a571c0514ccacae1df56b8b1f47f0e1/app/controllers/projects/application_controller.rb#L39 when CI job is in debug_mode