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
Léo-Paul Géneau
gitlab-ce
Commits
860c8cfc
Commit
860c8cfc
authored
Jan 25, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added header to protected branches access dropdowns
CE part of
https://gitlab.com/gitlab-org/gitlab-ee/issues/1294
parent
fadeefb6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
app/controllers/projects/protected_branches_controller.rb
app/controllers/projects/protected_branches_controller.rb
+6
-2
changelogs/unreleased/protected-branch-dropdown-titles.yml
changelogs/unreleased/protected-branch-dropdown-titles.yml
+4
-0
spec/features/protected_branches/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 @
860c8cfc
...
@@ -68,8 +68,12 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
...
@@ -68,8 +68,12 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
def
access_levels_options
def
access_levels_options
{
{
push_access_levels:
ProtectedBranch
::
PushAccessLevel
.
human_access_levels
.
map
{
|
id
,
text
|
{
id:
id
,
text:
text
,
before_divider:
true
}
},
push_access_levels:
{
merge_access_levels:
ProtectedBranch
::
MergeAccessLevel
.
human_access_levels
.
map
{
|
id
,
text
|
{
id:
id
,
text:
text
,
before_divider:
true
}
}
"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
end
...
...
changelogs/unreleased/protected-branch-dropdown-titles.yml
0 → 100644
View file @
860c8cfc
---
title
:
Added headers to protected branch access dropdowns
merge_request
:
author
:
spec/features/protected_branches/access_control_ce_spec.rb
View file @
860c8cfc
...
@@ -26,7 +26,11 @@ RSpec.shared_examples "protected branches > access control > CE" do
...
@@ -26,7 +26,11 @@ RSpec.shared_examples "protected branches > access control > CE" do
within
(
".protected-branches-list"
)
do
within
(
".protected-branches-list"
)
do
find
(
".js-allowed-to-push"
).
click
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
end
wait_for_ajax
wait_for_ajax
...
@@ -61,7 +65,11 @@ RSpec.shared_examples "protected branches > access control > CE" do
...
@@ -61,7 +65,11 @@ RSpec.shared_examples "protected branches > access control > CE" do
within
(
".protected-branches-list"
)
do
within
(
".protected-branches-list"
)
do
find
(
".js-allowed-to-merge"
).
click
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
end
wait_for_ajax
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