summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-07-06 15:38:43 +0300
committerValery Sizov <vsv2711@gmail.com>2015-07-06 17:40:33 +0300
commit111ebe54712aca16f3ad0f3d859c1c036ccb9f09 (patch)
tree058564d9186c5bd291da7753cf8ee9d0c01f8c1e /app/views
parent17446ff0c98e870f0500279983432e5115e060a4 (diff)
downloadgitlab-ce-111ebe54712aca16f3ad0f3d859c1c036ccb9f09.tar.gz
Fork visibility level fixfork_visibility_level
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/edit.html.haml2
-rw-r--r--app/views/shared/_visibility_radios.html.haml1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 3fecd25c324..99078e43937 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -29,7 +29,7 @@
.col-sm-10= f.select(:default_branch, @repository.branch_names, {}, {class: 'select2 select-wide'})
- = render 'shared/visibility_level', f: f, visibility_level: @project.visibility_level, can_change_visibility_level: can?(current_user, :change_visibility_level, @project), form_model: @project
+ = render 'shared/visibility_level', f: f, visibility_level: @project.visibility_level, can_change_visibility_level: can_change_visibility_level?(@project, current_user), form_model: @project
.form-group
= f.label :tag_list, "Tags", class: 'control-label'
diff --git a/app/views/shared/_visibility_radios.html.haml b/app/views/shared/_visibility_radios.html.haml
index 02416125a72..ebe2eb0433d 100644
--- a/app/views/shared/_visibility_radios.html.haml
+++ b/app/views/shared/_visibility_radios.html.haml
@@ -1,4 +1,5 @@
- Gitlab::VisibilityLevel.values.each do |level|
+ - next if skip_level?(form_model, level)
.radio
- restricted = restricted_visibility_levels.include?(level)
= form.label "#{model_method}_#{level}" do