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
c9caccd9
Commit
c9caccd9
authored
Oct 21, 2017
by
Rubén Dávila
Committed by
Bob Van Landuyt
Nov 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor setting view to reuse code
parent
1f3c96f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
9 deletions
+16
-9
app/models/license.rb
app/models/license.rb
+1
-0
app/views/shared/push_rules/_commit_author_check_setting.html.haml
.../shared/push_rules/_commit_author_check_setting.html.haml
+12
-0
app/views/shared/push_rules/_form.html.haml
app/views/shared/push_rules/_form.html.haml
+2
-8
app/views/shared/push_rules/_reject_unsigned_commits_setting.html.haml
...red/push_rules/_reject_unsigned_commits_setting.html.haml
+1
-1
No files found.
app/models/license.rb
View file @
c9caccd9
...
...
@@ -48,6 +48,7 @@ class License < ActiveRecord::Base
service_desk
variable_environment_scope
reject_unsigned_commits
commit_author_check
]
.
freeze
EEU_FEATURES
=
EEP_FEATURES
...
...
app/views/shared/push_rules/_commit_author_check_setting.html.haml
0 → 100644
View file @
c9caccd9
-
return
unless
push_rule
.
available?
(
:commit_author_check
)
-
form
=
local_assigns
.
fetch
(
:form
)
-
push_rule
=
local_assigns
.
fetch
(
:push_rule
)
.form-group
=
form
.
check_box
:commit_author_check
,
class:
"pull-left"
,
disabled:
!
can_change_push_rule?
(
f
.
object
,
:commit_author_check
)
.prepend-left-20
=
form
.
label
:commit_author_check
,
class:
"label-light append-bottom-0"
do
Author restriction
%p
.light.append-bottom-0
=
commit_author_check_description
(
f
.
object
)
app/views/shared/push_rules/_form.html.haml
View file @
c9caccd9
=
render
'shared/push_rules/
reject_unsigned_commits
_setting'
,
form:
f
,
push_rule:
f
.
object
=
render
'shared/push_rules/
commit_author_check
_setting'
,
form:
f
,
push_rule:
f
.
object
.form-group
=
f
.
check_box
:commit_author_check
,
class:
"pull-left"
,
disabled:
!
can_change_push_rule?
(
f
.
object
,
:commit_author_check
)
.prepend-left-20
=
f
.
label
:commit_author_check
,
class:
"label-light append-bottom-0"
do
Author restriction
%p
.light.append-bottom-0
=
commit_author_check_description
(
f
.
object
)
=
render
'shared/push_rules/reject_unsigned_commits_setting'
,
form:
f
,
push_rule:
f
.
object
.form-group
=
f
.
check_box
:deny_delete_tag
,
class:
"pull-left"
...
...
app/views/shared/push_rules/_reject_unsigned_commits_setting.html.haml
View file @
c9caccd9
...
...
@@ -4,7 +4,7 @@
-
push_rule
=
local_assigns
.
fetch
(
:push_rule
)
.form-group
=
form
.
check_box
:reject_unsigned_commits
,
class:
"pull-left"
,
disabled:
!
can_change_
reject_unsigned_commits?
(
push_rule
)
=
form
.
check_box
:reject_unsigned_commits
,
class:
"pull-left"
,
disabled:
!
can_change_
push_rule?
(
f
.
object
,
:reject_unsigned_commits
)
.prepend-left-20
=
form
.
label
:reject_unsigned_commits
,
class:
"label-light append-bottom-0"
do
Reject unsigned commits
...
...
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