diff options
author | Valeriy Sizov <vsv2711@gmail.com> | 2012-11-07 03:50:42 -0800 |
---|---|---|
committer | Valeriy Sizov <vsv2711@gmail.com> | 2012-11-07 03:50:42 -0800 |
commit | d6a5e3dad7a8d5aa1eb2220c2c60f068455dbaed (patch) | |
tree | 0add3061531048c554a7cd20ebe79097d8972475 /lib | |
parent | 10d881c9cad92169a3105cff0f02601dad4448cf (diff) | |
parent | cf70439e0a61637a8ad12360c53df08320b937b9 (diff) | |
download | gitlab-ce-d6a5e3dad7a8d5aa1eb2220c2c60f068455dbaed.tar.gz |
Merge pull request #1735 from NARKOZ/api
API fixes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/users.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 7f548aaa667..57e0aa108cf 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -23,24 +23,23 @@ module Gitlab @user = User.find(params[:id]) present @user, with: Entities::User end - + # Create user. Available only for admin # # 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] - user = User.new attrs + 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 else |