Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
f66f9e95
Commit
f66f9e95
authored
Jan 15, 2016
by
Andrew Johnson
Committed by
Grzegorz Bizon
Jan 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give reporters the ability to download artifacts.
Also fix a few places where page_404 should be render_404.
parent
f093d8cc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/controllers/projects/builds_controller.rb
app/controllers/projects/builds_controller.rb
+2
-2
app/controllers/projects/commit_controller.rb
app/controllers/projects/commit_controller.rb
+1
-1
app/models/ability.rb
app/models/ability.rb
+1
-1
No files found.
app/controllers/projects/builds_controller.rb
View file @
f66f9e95
...
@@ -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
app/controllers/projects/commit_controller.rb
View file @
f66f9e95
...
@@ -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
app/models/ability.rb
View file @
f66f9e95
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment