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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
72b59d6e
Commit
72b59d6e
authored
Feb 05, 2019
by
Daniel Juarez
Committed by
Sean McGivern
Feb 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comparing equality between `ActionController::Parameters` and a `Hash`....
parent
55cb4bc9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
app/controllers/concerns/service_params.rb
app/controllers/concerns/service_params.rb
+1
-1
changelogs/unreleased/fix_jira_integration_VCS1019.yml
changelogs/unreleased/fix_jira_integration_VCS1019.yml
+5
-0
spec/controllers/projects/services_controller_spec.rb
spec/controllers/projects/services_controller_spec.rb
+10
-0
No files found.
app/controllers/concerns/service_params.rb
View file @
72b59d6e
...
...
@@ -72,7 +72,7 @@ module ServiceParams
dynamic_params
=
@service
.
event_channel_names
+
@service
.
event_names
# rubocop:disable Gitlab/ModuleWithInstanceVariables
service_params
=
params
.
permit
(
:id
,
service:
allowed_service_params
+
dynamic_params
)
if
service_params
[
:service
].
is_a?
(
Hash
)
if
service_params
[
:service
].
is_a?
(
ActionController
::
Parameters
)
FILTER_BLANK_PARAMS
.
each
do
|
param
|
service_params
[
:service
].
delete
(
param
)
if
service_params
[
:service
][
param
].
blank?
end
...
...
changelogs/unreleased/fix_jira_integration_VCS1019.yml
0 → 100644
View file @
72b59d6e
---
title
:
Fix Jira Service password validation on project integration services.
merge_request
:
24896
author
:
Daniel Juarez
type
:
fixed
spec/controllers/projects/services_controller_spec.rb
View file @
72b59d6e
...
...
@@ -152,6 +152,16 @@ describe Projects::ServicesController do
expect
(
service
.
namespace
).
not_to
eq
(
'updated_namespace'
)
end
end
context
'when activating JIRA service from a template'
do
let
(
:template_service
)
{
create
(
:jira_service
,
project:
project
,
template:
true
)
}
it
'activate JIRA service from template'
do
put
:update
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
service
.
to_param
,
service:
{
active:
true
}
}
expect
(
flash
[
:notice
]).
to
eq
'JIRA activated.'
end
end
end
describe
"GET #edit"
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