summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJerome Dalbert <jerome@rentify.com>2014-01-18 19:07:00 +0000
committerJerome Dalbert <jerome@rentify.com>2014-01-18 19:15:10 +0000
commit2e3f250d4516c92adce5511747419d7f1fe04b97 (patch)
treebdf7a0dc744a55a3b96a10131baebd996e5b9d79 /lib
parentdba982403b7b894d2096ea61b89a247060eefe57 (diff)
downloadgitlab-ce-2e3f250d4516c92adce5511747419d7f1fe04b97.tar.gz
Add website url to user
Diffstat (limited to 'lib')
-rw-r--r--lib/api/entities.rb2
-rw-r--r--lib/api/users.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 8d2f38c4daa..76a56a0f0a6 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -1,7 +1,7 @@
module API
module Entities
class User < Grape::Entity
- expose :id, :username, :email, :name, :bio, :skype, :linkedin, :twitter,
+ expose :id, :username, :email, :name, :bio, :skype, :linkedin, :twitter, :website_url,
:theme_id, :color_scheme_id, :state, :created_at, :extern_uid, :provider
expose :is_admin?, as: :is_admin
expose :can_create_group?, as: :can_create_group
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 475343a3edf..89ec2c61a86 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -36,6 +36,7 @@ module API
# skype - Skype ID
# linkedin - Linkedin
# twitter - Twitter account
+ # website_url - Website url
# projects_limit - Number of projects user can create
# extern_uid - External authentication provider UID
# provider - External provider
@@ -67,6 +68,7 @@ module API
# skype - Skype ID
# linkedin - Linkedin
# twitter - Twitter account
+ # website_url - Website url
# projects_limit - Limit projects each user can create
# extern_uid - External authentication provider UID
# provider - External provider
@@ -78,7 +80,7 @@ module API
put ":id" do
authenticated_as_admin!
- attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit, :username, :extern_uid, :provider, :bio, :can_create_group, :admin]
+ attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :website_url, :projects_limit, :username, :extern_uid, :provider, :bio, :can_create_group, :admin]
user = User.find(params[:id])
not_found!("User not found") unless user