diff options
| author | Sean Packham <seanpackham@gitlab.com> | 2016-09-27 15:42:35 +0100 |
|---|---|---|
| committer | Sean Packham <seanpackham@gitlab.com> | 2016-09-27 15:42:35 +0100 |
| commit | 1aad8f2f0f68f7ba1811a3fff48b181af85f752d (patch) | |
| tree | a8d45620ef22fa4a553de813254add25a998ee8c /lib/api/users.rb | |
| parent | 0ef54d504c90146ffdbff5c699a40c689127b369 (diff) | |
| parent | 7b42ff6306bccc63a70f6731ce92974ec0a5e12b (diff) | |
| download | gitlab-ce-1aad8f2f0f68f7ba1811a3fff48b181af85f752d.tar.gz | |
Merge branch 'master' into add-university-content
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 c440305ff0f..18c4cad09ae 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -60,6 +60,7 @@ module API # linkedin - Linkedin # twitter - Twitter account # website_url - Website url + # organization - Organization # projects_limit - Number of projects user can create # extern_uid - External authentication provider UID # provider - External provider @@ -74,7 +75,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, :location, :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, :organization] admin = attrs.delete(:admin) confirm = !(attrs.delete(:confirm) =~ /(false|f|no|0)$/i) user = User.build_user(attrs) @@ -111,6 +112,7 @@ module API # linkedin - Linkedin # twitter - Twitter account # website_url - Website url + # organization - Organization # projects_limit - Limit projects each user can create # bio - Bio # location - Location of the user @@ -122,7 +124,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, :location, :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, :organization] user = User.find(params[:id]) not_found!('User') unless user |
