Commit 1473908e authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'project-edit-duplicated-sections' into 'master'

Removed project edit visibility radio buttons

Closes gitlab-ce#27050 and gitlab-ce#27049

See merge request !1097
parents 411e124b ec643e98
...@@ -21,18 +21,6 @@ ...@@ -21,18 +21,6 @@
.form-group .form-group
= f.label :default_branch, "Default Branch", class: 'label-light' = f.label :default_branch, "Default Branch", class: 'label-light'
= f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'}) = f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'})
.form-group.project-visibility-level-holder
= f.label :visibility_level, class: 'label-light' do
Visibility Level
= link_to "(?)", help_page_path("public_access/public_access")
- if can_change_visibility_level?(@project, current_user)
= render('shared/visibility_radios', model_method: :visibility_level, form: f, selected_level: @project.visibility_level, form_model: @project)
- else
.info
= visibility_level_icon(@project.visibility_level)
%strong
= visibility_level_label(@project.visibility_level)
.light= visibility_level_description(@project.visibility_level, @project)
- if current_user.admin? - if current_user.admin?
.form-group .form-group
...@@ -42,9 +30,6 @@ ...@@ -42,9 +30,6 @@
%span.help-block#repository_size_limit_help_block %span.help-block#repository_size_limit_help_block
= size_limit_message(@project) = size_limit_message(@project)
.form-group
= render 'shared/allow_request_access', form: f
.form-group .form-group
= f.label :tag_list, "Tags", class: 'label-light' = f.label :tag_list, "Tags", class: 'label-light'
= f.text_field :tag_list, value: @project.tag_list.to_s, maxlength: 2000, class: "form-control" = f.text_field :tag_list, value: @project.tag_list.to_s, maxlength: 2000, class: "form-control"
......
...@@ -13,6 +13,21 @@ feature 'Project edit', feature: true, js: true do ...@@ -13,6 +13,21 @@ feature 'Project edit', feature: true, js: true do
visit edit_namespace_project_path(project.namespace, project) visit edit_namespace_project_path(project.namespace, project)
end end
it 'does not have visibility radio buttons' do
expect(page).not_to have_selector('#project_visibility_level_0')
expect(page).not_to have_selector('#project_visibility_level_10')
expect(page).not_to have_selector('#project_visibility_level_20')
end
it 'allows user to change request access settings' do
find('#project_request_access_enabled').set(true)
click_button 'Save changes'
wait_for_ajax
expect(find('#project_request_access_enabled')).to be_checked
end
context 'feature visibility' do context 'feature visibility' do
context 'merge requests select' do context 'merge requests select' do
it 'hides merge requests section' do it 'hides merge requests section' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment