Commit 00325a733a76d8388a64e4a38c8f4e70f2a49938
1 parent
0369c74e
Exists in
master
and in
4 other branches
name and password_confirmation not required to create a user via API
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
lib/api/users.rb
| ... | ... | @@ -28,18 +28,17 @@ module Gitlab |
| 28 | 28 | # |
| 29 | 29 | # Parameters: |
| 30 | 30 | # email (required) - Email |
| 31 | - # name (required) - Name | |
| 32 | 31 | # password (required) - Password |
| 33 | - # password_confirmation (required) - Password confirmation | |
| 32 | + # name - Name | |
| 34 | 33 | # skype - Skype ID |
| 35 | 34 | # linkedin - Linkedin |
| 36 | 35 | # twitter - Twitter account |
| 37 | - # projects_limit - Limit projects wich user can create | |
| 36 | + # projects_limit - Number of projects user can create | |
| 38 | 37 | # Example Request: |
| 39 | 38 | # POST /users |
| 40 | 39 | post do |
| 41 | 40 | authenticated_as_admin! |
| 42 | - attrs = attributes_for_keys [:email, :name, :password, :password_confirmation, :skype, :linkedin, :twitter, :projects_limit] | |
| 41 | + attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit] | |
| 43 | 42 | user = User.new attrs, as: :admin |
| 44 | 43 | if user.save |
| 45 | 44 | present user, with: Entities::User | ... | ... |