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
a87de0a0
Commit
a87de0a0
authored
Feb 23, 2022
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update response code to 403
parent
6acc1ff3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ee/lib/api/alert_management_alerts.rb
ee/lib/api/alert_management_alerts.rb
+1
-1
ee/spec/requests/api/alert_management_alerts_spec.rb
ee/spec/requests/api/alert_management_alerts_spec.rb
+1
-1
No files found.
ee/lib/api/alert_management_alerts.rb
View file @
a87de0a0
...
...
@@ -80,7 +80,7 @@ module API
authorize!
(
:update_alert_management_metric_image
,
alert
)
render_api_error!
(
'Feature not available'
,
40
0
)
unless
alert
.
metric_images_available?
render_api_error!
(
'Feature not available'
,
40
3
)
unless
alert
.
metric_images_available?
metric_image
=
alert
.
metric_images
.
find_by_id
(
params
[
:metric_image_id
])
...
...
ee/spec/requests/api/alert_management_alerts_spec.rb
View file @
a87de0a0
...
...
@@ -335,7 +335,7 @@ RSpec.describe API::AlertManagementAlerts do
it
'returns an error'
do
subject
expect
(
response
).
to
have_gitlab_http_status
(
:
bad_request
)
expect
(
response
).
to
have_gitlab_http_status
(
:
forbidden
)
expect
(
json_response
[
'message'
]).
to
eq
(
'Feature not available'
)
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