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
d60243ed
Commit
d60243ed
authored
Sep 13, 2019
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename params to exclude constant
parent
d5b923d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ee/app/controllers/projects/alerting/notifications_controller.rb
...controllers/projects/alerting/notifications_controller.rb
+2
-2
ee/spec/controllers/projects/alerting/notifications_controller_spec.rb
...ollers/projects/alerting/notifications_controller_spec.rb
+1
-1
No files found.
ee/app/controllers/projects/alerting/notifications_controller.rb
View file @
d60243ed
...
...
@@ -19,7 +19,7 @@ module Projects
private
FORBIDDEN_PARAMS
=
%w(controller action namespace_id project_id)
.
freeze
PARAMS_TO_EXCLUDE
=
%w(controller action namespace_id project_id)
.
freeze
def
project_without_auth
@project
||=
Project
...
...
@@ -51,7 +51,7 @@ module Projects
end
def
permitted_params
params
.
reject!
{
|
param
|
param
.
in?
(
FORBIDDEN_PARAMS
)
}.
permit!
params
.
except
(
*
PARAMS_TO_EXCLUDE
).
permit!
# rubocop:disable CodeReuse/ActiveRecord
end
end
end
...
...
ee/spec/controllers/projects/alerting/notifications_controller_spec.rb
View file @
d60243ed
...
...
@@ -38,7 +38,7 @@ describe Projects::Alerting::NotificationsController do
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
end
it
'does not pass
forbidden
parameters to the notify service'
do
it
'does not pass
excluded
parameters to the notify service'
do
make_request
(
payload
)
expect
(
Projects
::
Alerting
::
NotifyService
)
...
...
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