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
b7eb0d17
Commit
b7eb0d17
authored
Dec 26, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add checkbox for protected branch developer can push to.
parent
6ce3b1a3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
protected_branches_controller.rb
app/controllers/projects/protected_branches_controller.rb
+1
-1
index.html.haml
app/views/projects/protected_branches/index.html.haml
+4
-0
No files found.
app/controllers/projects/protected_branches_controller.rb
View file @
b7eb0d17
...
...
@@ -27,6 +27,6 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
private
def
protected_branch_params
params
.
require
(
:protected_branch
).
permit
(
:name
)
params
.
require
(
:protected_branch
).
permit
(
:name
,
:developers_can_push
)
end
end
app/views/projects/protected_branches/index.html.haml
View file @
b7eb0d17
...
...
@@ -22,6 +22,10 @@
=
f
.
label
:name
,
"Branch"
,
class:
'control-label'
.col-sm-10
=
f
.
select
(
:name
,
@project
.
open_branches
.
map
{
|
br
|
[
br
.
name
,
br
.
name
]
}
,
{
include_blank:
"Select branch"
},
{
class:
"select2"
})
.form-group
=
f
.
label
:developers_can_push
,
"Developers can push?"
,
class:
'control-label'
.col-sm-10
=
f
.
check_box
:developers_can_push
.form-actions
=
f
.
submit
'Protect'
,
class:
"btn-create btn"
-
unless
@branches
.
empty?
...
...
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