summaryrefslogtreecommitdiff
path: root/app/controllers/projects/jobs_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/jobs_controller.rb')
-rw-r--r--app/controllers/projects/jobs_controller.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb
index bfc2fe6432d..8146308aa97 100644
--- a/app/controllers/projects/jobs_controller.rb
+++ b/app/controllers/projects/jobs_controller.rb
@@ -171,17 +171,7 @@ class Projects::JobsController < Projects::ApplicationController
private
- def authorize_read_build_trace!
- return if can?(current_user, :read_build_trace, @build)
-
- msg = _(
- "You must have developer or higher permissions in the associated project to view job logs when debug trace is enabled. To disable debug trace, set the 'CI_DEBUG_TRACE' variable to 'false' in your pipeline configuration or CI/CD settings. " \
- "If you need to view this job log, a project maintainer must add you to the project with developer permissions or higher."
- )
- return access_denied!(msg) if @build.debug_mode?
-
- access_denied!(_('The current user is not authorized to access the job log.'))
- end
+ attr_reader :build
def authorize_update_build!
return access_denied! unless can?(current_user, :update_build, @build)