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
701a6fd0
Commit
701a6fd0
authored
Jan 20, 2021
by
Jonathan Schafer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issues from vulns default to confidential
parent
4fa3eee3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+1
-1
ee/changelogs/unreleased/296776-issues-created-from-vulnerabilities-set-to-confidential-by-defa.yml
...ated-from-vulnerabilities-set-to-confidential-by-defa.yml
+5
-0
ee/spec/controllers/projects/issues_controller_spec.rb
ee/spec/controllers/projects/issues_controller_spec.rb
+9
-1
No files found.
app/controllers/projects/issues_controller.rb
View file @
701a6fd0
...
...
@@ -105,7 +105,7 @@ class Projects::IssuesController < Projects::ApplicationController
build_params
=
issue_create_params
.
merge
(
merge_request_to_resolve_discussions_of:
params
[
:merge_request_to_resolve_discussions_of
],
discussion_to_resolve:
params
[
:discussion_to_resolve
],
confidential:
!!
Gitlab
::
Utils
.
to_boolean
(
params
[
:issue
][
:confidential
])
confidential:
issue_create_params
[
:confidential
]
||
!!
Gitlab
::
Utils
.
to_boolean
(
params
[
:issue
][
:confidential
])
)
service
=
::
Issues
::
BuildService
.
new
(
project
,
current_user
,
build_params
)
...
...
ee/changelogs/unreleased/296776-issues-created-from-vulnerabilities-set-to-confidential-by-defa.yml
0 → 100644
View file @
701a6fd0
---
title
:
Issues created from Vulnerabilities set to Confidential by default
merge_request
:
52127
author
:
type
:
changed
ee/spec/controllers/projects/issues_controller_spec.rb
View file @
701a6fd0
...
...
@@ -69,11 +69,19 @@ RSpec.describe Projects::IssuesController do
let
(
:vulnerability
)
{
create
(
:vulnerability
,
project:
project
,
findings:
[
finding
])
}
let
(
:vulnerability_field
)
{
"<input type=
\"
hidden
\"
name=
\"
vulnerability_id
\"
id=
\"
vulnerability_id
\"
value=
\"
#{
vulnerability
.
id
}
\"
/>"
}
subject
{
get
:new
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
vulnerability_id:
vulnerability
.
id
}
}
it
'sets the vulnerability_id'
do
get
:new
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
vulnerability_id:
vulnerability
.
id
}
subject
expect
(
response
.
body
).
to
include
(
vulnerability_field
)
end
it
'sets the confidential flag to true by default'
do
subject
expect
(
assigns
(
:issue
).
confidential
).
to
eq
(
true
)
end
end
end
...
...
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