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
3cb092a7
Commit
3cb092a7
authored
Jan 27, 2021
by
Jonathan Schafer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Confidential flag checks issue_create_params
parent
2815859c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
12 deletions
+5
-12
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+3
-6
ee/app/controllers/ee/projects/issues_controller.rb
ee/app/controllers/ee/projects/issues_controller.rb
+2
-6
No files found.
app/controllers/projects/issues_controller.rb
View file @
3cb092a7
...
...
@@ -104,8 +104,9 @@ 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
]
).
merge
(
confidential:
confidential_issue?
)
discussion_to_resolve:
params
[
:discussion_to_resolve
],
confidential:
!!
Gitlab
::
Utils
.
to_boolean
(
issue_create_params
[
:confidential
])
)
service
=
::
Issues
::
BuildService
.
new
(
project
,
current_user
,
build_params
)
@issue
=
@noteable
=
service
.
execute
...
...
@@ -392,10 +393,6 @@ class Projects::IssuesController < Projects::ApplicationController
action_name
==
'service_desk'
end
def
confidential_issue?
!!
Gitlab
::
Utils
.
to_boolean
(
params
[
:issue
][
:confidential
])
end
def
run_null_hypothesis_experiment
experiment
(
:null_hypothesis
,
project:
project
)
do
|
e
|
e
.
use
{
}
# define the control
...
...
ee/app/controllers/ee/projects/issues_controller.rb
View file @
3cb092a7
...
...
@@ -68,7 +68,8 @@ module EE
def
vulnerability_issue_build_parameters
{
title:
_
(
"Investigate vulnerability: %{title}"
)
%
{
title:
vulnerability
.
title
},
description:
render_vulnerability_description
description:
render_vulnerability_description
,
confidential:
true
}
end
...
...
@@ -89,11 +90,6 @@ module EE
def
populate_vulnerability_id
self
.
vulnerability_id
=
params
[
:vulnerability_id
]
if
can?
(
current_user
,
:read_vulnerability
,
project
)
end
override
:confidential_issue?
def
confidential_issue?
vulnerability_id
.
present?
||
super
end
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