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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
cd26cfbc
Commit
cd26cfbc
authored
May 21, 2016
by
Kamil Trzcinski
Committed by
Grzegorz Bizon
May 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow anonymous user to access pipelines
parent
243e9bc0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
1 deletion
+14
-1
CHANGELOG
CHANGELOG
+1
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+4
-0
app/models/ability.rb
app/models/ability.rb
+1
-0
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+2
-1
spec/features/pipelines_spec.rb
spec/features/pipelines_spec.rb
+6
-0
No files found.
CHANGELOG
View file @
cd26cfbc
...
@@ -25,6 +25,7 @@ v 8.8.0 (unreleased)
...
@@ -25,6 +25,7 @@ v 8.8.0 (unreleased)
- Updated gitlab_git to 10.1.0
- Updated gitlab_git to 10.1.0
- GitAccess#protected_tag? no longer loads all tags just to check if a single one exists
- GitAccess#protected_tag? no longer loads all tags just to check if a single one exists
- Reduce delay in destroying a project from 1-minute to immediately
- Reduce delay in destroying a project from 1-minute to immediately
- Fix access to Pipelines by Anonymous user
- Make build status canceled if any of the jobs was canceled and none failed
- Make build status canceled if any of the jobs was canceled and none failed
- Upgrade Sidekiq to 4.1.2
- Upgrade Sidekiq to 4.1.2
- Added /health_check endpoint for checking service status
- Added /health_check endpoint for checking service status
...
...
app/helpers/projects_helper.rb
View file @
cd26cfbc
...
@@ -144,6 +144,10 @@ module ProjectsHelper
...
@@ -144,6 +144,10 @@ module ProjectsHelper
nav_tabs
<<
:merge_requests
nav_tabs
<<
:merge_requests
end
end
if
can?
(
current_user
,
:read_pipeline
,
project
)
nav_tabs
<<
:pipelines
end
if
can?
(
current_user
,
:read_build
,
project
)
if
can?
(
current_user
,
:read_build
,
project
)
nav_tabs
<<
:builds
nav_tabs
<<
:builds
end
end
...
...
app/models/ability.rb
View file @
cd26cfbc
...
@@ -60,6 +60,7 @@ class Ability
...
@@ -60,6 +60,7 @@ class Ability
:read_project_member
,
:read_project_member
,
:read_merge_request
,
:read_merge_request
,
:read_note
,
:read_note
,
:read_pipeline
,
:read_commit_status
,
:read_commit_status
,
:read_container_image
,
:read_container_image
,
:download_code
:download_code
...
...
app/views/layouts/nav/_project.html.haml
View file @
cd26cfbc
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
%span
%span
Commits
Commits
-
if
project_nav_tab?
:
build
s
-
if
project_nav_tab?
:
pipeline
s
=
nav_link
(
controller: :pipelines
)
do
=
nav_link
(
controller: :pipelines
)
do
=
link_to
project_pipelines_path
(
@project
),
title:
'Pipelines'
,
class:
'shortcuts-pipelines'
do
=
link_to
project_pipelines_path
(
@project
),
title:
'Pipelines'
,
class:
'shortcuts-pipelines'
do
=
icon
(
'ship fw'
)
=
icon
(
'ship fw'
)
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
Pipelines
Pipelines
%span
.count.ci_counter
=
number_with_delimiter
(
@project
.
ci_commits
.
running_or_pending
.
count
)
%span
.count.ci_counter
=
number_with_delimiter
(
@project
.
ci_commits
.
running_or_pending
.
count
)
-
if
project_nav_tab?
:builds
=
nav_link
(
controller:
%w(builds)
)
do
=
nav_link
(
controller:
%w(builds)
)
do
=
link_to
project_builds_path
(
@project
),
title:
'Builds'
,
class:
'shortcuts-builds'
do
=
link_to
project_builds_path
(
@project
),
title:
'Builds'
,
class:
'shortcuts-builds'
do
=
icon
(
'cubes fw'
)
=
icon
(
'cubes fw'
)
...
...
spec/features/pipelines_spec.rb
View file @
cd26cfbc
...
@@ -24,6 +24,12 @@ describe "Pipelines" do
...
@@ -24,6 +24,12 @@ describe "Pipelines" do
end
end
end
end
context
'anonymous access'
do
before
{
visit
namespace_project_pipelines_path
(
project
.
namespace
,
project
)
}
it
{
expect
(
page
).
to
have_http_status
(
:success
)
}
end
context
'cancelable pipeline'
do
context
'cancelable pipeline'
do
let!
(
:running
)
{
create
(
:ci_build
,
:running
,
commit:
pipeline
,
stage:
'test'
,
commands:
'test'
)
}
let!
(
:running
)
{
create
(
:ci_build
,
:running
,
commit:
pipeline
,
stage:
'test'
,
commands:
'test'
)
}
...
...
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