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
7c945324
Commit
7c945324
authored
Sep 11, 2020
by
David O'Regan
Committed by
Peter Leitzen
Sep 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Guard type selector via permissions
parent
c39a67de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/views/shared/issuable/form/_type_selector.html.haml
app/views/shared/issuable/form/_type_selector.html.haml
+1
-1
spec/features/issues/user_creates_issue_spec.rb
spec/features/issues/user_creates_issue_spec.rb
+4
-0
No files found.
app/views/shared/issuable/form/_type_selector.html.haml
View file @
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
.
label
:type
,
'Type'
,
class:
'col-form-label col-sm-2'
...
...
spec/features/issues/user_creates_issue_spec.rb
View file @
7c945324
...
...
@@ -61,6 +61,10 @@ RSpec.describe "User creates issue" do
.
and
have_content
(
project
.
name
)
expect
(
page
).
to
have_selector
(
'strong'
,
text:
'Description'
)
end
it
'does not render the issue type dropdown'
do
expect
(
page
).
not_to
have_selector
(
'.s-issuable-type-filter-dropdown-wrap'
)
end
end
context
"when signed in as developer"
,
:js
do
...
...
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