提交 c433b191 编写于 作者: S Stan Hu

Merge branch 'rs-default-user-entity' into 'master'

Ensure we use `Entities::User` for non-admin `users/:id` API requests

See merge request gitlab-org/gitlab-ce!14314
......@@ -88,7 +88,7 @@ module API
user = User.find_by(id: params[:id])
not_found!('User') unless user && can?(current_user, :read_user, user)
opts = current_user&.admin? ? { with: Entities::UserWithAdmin } : {}
opts = current_user&.admin? ? { with: Entities::UserWithAdmin } : { with: Entities::User }
present user, opts
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册