summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-16 22:13:26 +0000
committerStan Hu <stanhu@gmail.com>2019-07-16 22:13:26 +0000
commitf0400dc7c01ab53cdc286d639b50e1ce98a9beaf (patch)
tree3c24f4e4e773ccda631db07bbbbc817ff72e5ecc /lib
parente26d99329699ca550a2f1c21bbb1f4c481425085 (diff)
parentce40c12849c8977e285962f8752cd78ac64c92ea (diff)
downloadgitlab-ce-f0400dc7c01ab53cdc286d639b50e1ce98a9beaf.tar.gz
Merge branch '12800-read-and-write-user-admin-notes-via-api-ce' into 'master'
CE Backport: Read and write User "Admin notes" via API See merge request gitlab-org/gitlab-ce!30775
Diffstat (limited to 'lib')
-rw-r--r--lib/api/users.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 30a278fdff1..a4ac5b629b8 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -148,7 +148,7 @@ module API
end
desc 'Create a user. Available only for admins.' do
- success Entities::UserPublic
+ success Entities::UserWithAdmin
end
params do
requires :email, type: String, desc: 'The email of the user'
@@ -168,7 +168,7 @@ module API
user = ::Users::CreateService.new(current_user, params).execute(skip_authorization: true)
if user.persisted?
- present user, with: Entities::UserPublic, current_user: current_user
+ present user, with: Entities::UserWithAdmin, current_user: current_user
else
conflict!('Email has already been taken') if User
.by_any_email(user.email.downcase)
@@ -183,7 +183,7 @@ module API
end
desc 'Update a user. Available only for admins.' do
- success Entities::UserPublic
+ success Entities::UserWithAdmin
end
params do
requires :id, type: Integer, desc: 'The ID of the user'
@@ -215,7 +215,7 @@ module API
result = ::Users::UpdateService.new(current_user, user_params.merge(user: user)).execute
if result[:status] == :success
- present user, with: Entities::UserPublic, current_user: current_user
+ present user, with: Entities::UserWithAdmin, current_user: current_user
else
render_validation_error!(user)
end