BigW Consortium Gitlab

Commit 00325a73 by Nihad Abbasov

name and password_confirmation not required to create a user via API

parent 0369c74e
...@@ -28,18 +28,17 @@ module Gitlab ...@@ -28,18 +28,17 @@ module Gitlab
# #
# Parameters: # Parameters:
# email (required) - Email # email (required) - Email
# name (required) - Name
# password (required) - Password # password (required) - Password
# password_confirmation (required) - Password confirmation # name - Name
# skype - Skype ID # skype - Skype ID
# linkedin - Linkedin # linkedin - Linkedin
# twitter - Twitter account # twitter - Twitter account
# projects_limit - Limit projects wich user can create # projects_limit - Number of projects user can create
# Example Request: # Example Request:
# POST /users # POST /users
post do post do
authenticated_as_admin! 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 user = User.new attrs, as: :admin
if user.save if user.save
present user, with: Entities::User present user, with: Entities::User
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment