Commit f66f9e95 authored by Andrew Johnson's avatar Andrew Johnson Committed by Grzegorz Bizon

Give reporters the ability to download artifacts.

Also fix a few places where page_404 should be render_404.
parent f093d8cc
......@@ -42,7 +42,7 @@ class Projects::BuildsController < Projects::ApplicationController
def retry
unless @build.retryable?
return page_404
return render_404
end
build = Ci::Build.retry(@build)
......@@ -72,7 +72,7 @@ class Projects::BuildsController < Projects::ApplicationController
def authorize_manage_builds!
unless can?(current_user, :manage_builds, project)
return page_404
return render_404
end
end
end
......@@ -79,7 +79,7 @@ class Projects::CommitController < Projects::ApplicationController
def authorize_manage_builds!
unless can?(current_user, :manage_builds, project)
return page_404
return render_404
end
end
end
......@@ -160,6 +160,7 @@ class Ability
@project_report_rules ||= project_guest_rules + [
:create_commit_status,
:read_commit_statuses,
:read_build_artifacts,
:download_code,
:fork_project,
:create_project_snippet,
......@@ -175,7 +176,6 @@ class Ability
:create_merge_request,
:create_wiki,
:manage_builds,
:read_build_artifacts,
:push_code
]
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment