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
a30a420e
Commit
a30a420e
authored
Sep 30, 2020
by
sfang97
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return 403 for internal user deactivate
parent
fee43370
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+3
-3
No files found.
spec/requests/api/users_spec.rb
View file @
a30a420e
...
...
@@ -2485,10 +2485,10 @@ RSpec.describe API::Users, :do_not_mock_admin_mode do
end
context
'for an internal user'
do
it
'returns 403'
do
internal_user
=
User
.
alert_bot
let
(
:user
)
{
User
.
alert_bot
}
post
api
(
"/users/
#{
internal_user
.
id
}
/deactivate"
,
admin
)
it
'returns 403'
do
subject
expect
(
response
).
to
have_gitlab_http_status
(
:forbidden
)
expect
(
json_response
[
'message'
]).
to
eq
(
'403 Forbidden - An internal user cannot be deactivated by the API'
)
...
...
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