Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-17 11:36:00 +0300
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-17 11:36:00 +0300
commit51300d9b2a65a43742985847376150229b91c4ca (patch)
tree6e668def9790d94210e911b65c9ba56347d4e37e /lib
parentcde7eee73e611ca7f775e179fb07b931c37f54ae (diff)
API support for setting External flag on existing users
Diffstat (limited to 'lib')
-rw-r--r--lib/api/users.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index c574f042a66..8849fff60af 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -108,12 +108,13 @@ module API
# bio - Bio
# admin - User is admin - true or false (default)
# can_create_group - User can create groups - true or false
+ # external - Is user an external user - true or false(default)
# Example Request:
# PUT /users/:id
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]
+ attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :website_url, :projects_limit, :username, :bio, :can_create_group, :admin, :external]
user = User.find(params[:id])
not_found!('User') unless user