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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a60cc42b
Commit
a60cc42b
authored
Oct 31, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue_23951' into 'master'
Fix builds tab visibility closes #23951 See merge request !7178
parents
5566f277
cabc2a71
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+5
-1
spec/features/projects/features_visibility_spec.rb
spec/features/projects/features_visibility_spec.rb
+16
-0
No files found.
CHANGELOG.md
View file @
a60cc42b
...
@@ -45,6 +45,7 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -45,6 +45,7 @@ Please view this file on the master branch, on stable branches it's out of date.
-
Fix applying labels for GitHub-imported MRs !7139
-
Fix applying labels for GitHub-imported MRs !7139
-
Fix importing MR comments from GitHub !7139
-
Fix importing MR comments from GitHub !7139
-
Modify GitHub importer to be retryable !7003
-
Modify GitHub importer to be retryable !7003
-
Fix builds tab visibility
-
Fix and improve
`Sortable.highest_label_priority`
-
Fix and improve
`Sortable.highest_label_priority`
-
Fixed sticky merge request tabs when sidebar is pinned
-
Fixed sticky merge request tabs when sidebar is pinned
...
...
app/helpers/projects_helper.rb
View file @
a60cc42b
...
@@ -174,10 +174,14 @@ module ProjectsHelper
...
@@ -174,10 +174,14 @@ module ProjectsHelper
nav_tabs
<<
:merge_requests
nav_tabs
<<
:merge_requests
end
end
if
can?
(
current_user
,
:read_
build
,
project
)
if
can?
(
current_user
,
:read_
pipeline
,
project
)
nav_tabs
<<
:pipelines
nav_tabs
<<
:pipelines
end
end
if
can?
(
current_user
,
:read_build
,
project
)
nav_tabs
<<
:builds
end
if
Gitlab
.
config
.
registry
.
enabled
&&
can?
(
current_user
,
:read_container_image
,
project
)
if
Gitlab
.
config
.
registry
.
enabled
&&
can?
(
current_user
,
:read_container_image
,
project
)
nav_tabs
<<
:container_registry
nav_tabs
<<
:container_registry
end
end
...
...
spec/features/projects/features_visibility_spec.rb
View file @
a60cc42b
...
@@ -41,6 +41,22 @@ describe 'Edit Project Settings', feature: true do
...
@@ -41,6 +41,22 @@ describe 'Edit Project Settings', feature: true do
end
end
end
end
end
end
context
"pipelines subtabs"
do
it
"shows builds when enabled"
do
visit
namespace_project_pipelines_path
(
project
.
namespace
,
project
)
expect
(
page
).
to
have_selector
(
".shortcuts-builds"
)
end
it
"hides builds when disabled"
do
allow
(
Ability
).
to
receive
(
:allowed?
).
with
(
member
,
:read_builds
,
project
).
and_return
(
false
)
visit
namespace_project_pipelines_path
(
project
.
namespace
,
project
)
expect
(
page
).
not_to
have_selector
(
".shortcuts-builds"
)
end
end
end
end
describe
'project features visibility pages'
do
describe
'project features visibility pages'
do
...
...
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