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 ...@@ -42,7 +42,7 @@ class Projects::BuildsController < Projects::ApplicationController
def retry def retry
unless @build.retryable? unless @build.retryable?
return page_404 return render_404
end end
build = Ci::Build.retry(@build) build = Ci::Build.retry(@build)
...@@ -72,7 +72,7 @@ class Projects::BuildsController < Projects::ApplicationController ...@@ -72,7 +72,7 @@ class Projects::BuildsController < Projects::ApplicationController
def authorize_manage_builds! def authorize_manage_builds!
unless can?(current_user, :manage_builds, project) unless can?(current_user, :manage_builds, project)
return page_404 return render_404
end end
end end
end end
...@@ -79,7 +79,7 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -79,7 +79,7 @@ class Projects::CommitController < Projects::ApplicationController
def authorize_manage_builds! def authorize_manage_builds!
unless can?(current_user, :manage_builds, project) unless can?(current_user, :manage_builds, project)
return page_404 return render_404
end end
end end
end end
...@@ -160,6 +160,7 @@ class Ability ...@@ -160,6 +160,7 @@ class Ability
@project_report_rules ||= project_guest_rules + [ @project_report_rules ||= project_guest_rules + [
:create_commit_status, :create_commit_status,
:read_commit_statuses, :read_commit_statuses,
:read_build_artifacts,
:download_code, :download_code,
:fork_project, :fork_project,
:create_project_snippet, :create_project_snippet,
...@@ -175,7 +176,6 @@ class Ability ...@@ -175,7 +176,6 @@ class Ability
:create_merge_request, :create_merge_request,
:create_wiki, :create_wiki,
:manage_builds, :manage_builds,
:read_build_artifacts,
:push_code :push_code
] ]
end 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