BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
57d5a549
Commit
57d5a549
authored
Feb 10, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'protected-branch-dropdown-titles' into 'master'
Added header to protected branches access dropdowns See merge request !8774
parents
e355d8fe
860c8cfc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
protected_branches_controller.rb
app/controllers/projects/protected_branches_controller.rb
+6
-2
protected-branch-dropdown-titles.yml
changelogs/unreleased/protected-branch-dropdown-titles.yml
+4
-0
access_control_ce_spec.rb
spec/features/protected_branches/access_control_ce_spec.rb
+10
-2
No files found.
app/controllers/projects/protected_branches_controller.rb
View file @
57d5a549
...
...
@@ -68,8 +68,12 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
def
access_levels_options
{
push_access_levels:
ProtectedBranch
::
PushAccessLevel
.
human_access_levels
.
map
{
|
id
,
text
|
{
id:
id
,
text:
text
,
before_divider:
true
}
},
merge_access_levels:
ProtectedBranch
::
MergeAccessLevel
.
human_access_levels
.
map
{
|
id
,
text
|
{
id:
id
,
text:
text
,
before_divider:
true
}
}
push_access_levels:
{
"Roles"
=>
ProtectedBranch
::
PushAccessLevel
.
human_access_levels
.
map
{
|
id
,
text
|
{
id:
id
,
text:
text
,
before_divider:
true
}
},
},
merge_access_levels:
{
"Roles"
=>
ProtectedBranch
::
MergeAccessLevel
.
human_access_levels
.
map
{
|
id
,
text
|
{
id:
id
,
text:
text
,
before_divider:
true
}
}
}
}
end
...
...
changelogs/unreleased/protected-branch-dropdown-titles.yml
0 → 100644
View file @
57d5a549
---
title
:
Added headers to protected branch access dropdowns
merge_request
:
author
:
spec/features/protected_branches/access_control_ce_spec.rb
View file @
57d5a549
...
...
@@ -26,7 +26,11 @@ RSpec.shared_examples "protected branches > access control > CE" do
within
(
".protected-branches-list"
)
do
find
(
".js-allowed-to-push"
).
click
within
(
'.js-allowed-to-push-container'
)
{
click_on
access_type_name
}
within
(
'.js-allowed-to-push-container'
)
do
expect
(
first
(
"li"
)).
to
have_content
(
"Roles"
)
click_on
access_type_name
end
end
wait_for_ajax
...
...
@@ -61,7 +65,11 @@ RSpec.shared_examples "protected branches > access control > CE" do
within
(
".protected-branches-list"
)
do
find
(
".js-allowed-to-merge"
).
click
within
(
'.js-allowed-to-merge-container'
)
{
click_on
access_type_name
}
within
(
'.js-allowed-to-merge-container'
)
do
expect
(
first
(
"li"
)).
to
have_content
(
"Roles"
)
click_on
access_type_name
end
end
wait_for_ajax
...
...
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