diff options
author | BaldinoF <baldinof@gmail.com> | 2016-04-17 18:17:27 +0200 |
---|---|---|
committer | BaldinoF <baldinof@gmail.com> | 2016-04-17 18:17:27 +0200 |
commit | b04140a1e497c75a721bc4e5458907bf35a0a8b9 (patch) | |
tree | 8005646150e1c6979061e56a30f661b18ec331c7 /lib/api/users.rb | |
parent | 3918fce5bd073e18addb7d1d4aaf3c81ce8150b0 (diff) | |
parent | 5048064dc5e7ca30f65209c7ccd9fb90f9ac49db (diff) | |
download | gitlab-ce-b04140a1e497c75a721bc4e5458907bf35a0a8b9.tar.gz |
Merge branch 'master' into number_sign_for_external_issue_ref
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r-- | lib/api/users.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 13ab17c6904..0a14bac07c0 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -58,6 +58,7 @@ module API # extern_uid - External authentication provider UID # provider - External provider # bio - Bio + # location - Location of the user # admin - User is admin - true or false (default) # can_create_group - User can create groups - true or false # confirm - Require user confirmation - true (default) or false @@ -67,7 +68,7 @@ module API post do authenticated_as_admin! required_attributes! [:email, :password, :name, :username] - attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit, :username, :bio, :can_create_group, :admin, :confirm, :external] + attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit, :username, :bio, :location, :can_create_group, :admin, :confirm, :external] admin = attrs.delete(:admin) confirm = !(attrs.delete(:confirm) =~ (/(false|f|no|0)$/i)) user = User.build_user(attrs) @@ -106,6 +107,7 @@ module API # website_url - Website url # projects_limit - Limit projects each user can create # bio - Bio + # location - Location of the user # admin - User is admin - true or false (default) # can_create_group - User can create groups - true or false # external - Flags the user as external - true or false(default) @@ -114,7 +116,7 @@ module API put ":id" do authenticated_as_admin! - attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :website_url, :projects_limit, :username, :bio, :can_create_group, :admin, :external] + attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :website_url, :projects_limit, :username, :bio, :location, :can_create_group, :admin, :external] user = User.find(params[:id]) not_found!('User') unless user |