diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-10-19 03:34:18 -0700 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-10-19 03:34:18 -0700 |
commit | 00325a733a76d8388a64e4a38c8f4e70f2a49938 (patch) | |
tree | 403bd5d656df8ebb1c1edeb7d7c96ae93cc46b42 /lib/api/users.rb | |
parent | 0369c74e581ed7f3c2e6576be3f1afcd20b54022 (diff) | |
download | gitlab-ce-00325a733a76d8388a64e4a38c8f4e70f2a49938.tar.gz |
name and password_confirmation not required to create a user via API
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r-- | lib/api/users.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 108a3f123db..57e0aa108cf 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -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 |