name and password_confirmation not required to create a user via API
This commit is contained in:
parent
0369c74e58
commit
00325a733a
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue