提交 00325a73 编写于 作者: N Nihad Abbasov

name and password_confirmation not required to create a user via API

上级 0369c74e
......@@ -28,18 +28,17 @@ module Gitlab
#
# Parameters:
# email (required) - Email
# name (required) - Name
# password (required) - Password
# password_confirmation (required) - Password confirmation
# name - Name
# skype - Skype ID
# linkedin - Linkedin
# twitter - Twitter account
# projects_limit - Limit projects wich user can create
# projects_limit - Number of projects user can create
# Example Request:
# POST /users
post do
authenticated_as_admin!
attrs = attributes_for_keys [:email, :name, :password, :password_confirmation, :skype, :linkedin, :twitter, :projects_limit]
attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit]
user = User.new attrs, as: :admin
if user.save
present user, with: Entities::User
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册