Commit 8f871972 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '247464-issue-type-selector-permissions' into 'master'

Guard type selector via permissions

Closes #247464

See merge request gitlab-org/gitlab!42007
parents 79abeb8c 7c945324
- return unless issuable.supports_issue_type? - return unless issuable.supports_issue_type? && can?(current_user, :admin_issue, @project)
.form-group.row.gl-mb-0 .form-group.row.gl-mb-0
= form.label :type, 'Type', class: 'col-form-label col-sm-2' = form.label :type, 'Type', class: 'col-form-label col-sm-2'
......
...@@ -61,6 +61,10 @@ RSpec.describe "User creates issue" do ...@@ -61,6 +61,10 @@ RSpec.describe "User creates issue" do
.and have_content(project.name) .and have_content(project.name)
expect(page).to have_selector('strong', text: 'Description') expect(page).to have_selector('strong', text: 'Description')
end end
it 'does not render the issue type dropdown' do
expect(page).not_to have_selector('.s-issuable-type-filter-dropdown-wrap')
end
end end
context "when signed in as developer", :js do context "when signed in as developer", :js 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