summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorBoyan Tabakov <boyan.tabakov@futurice.com>2013-07-31 13:52:23 +0300
committerBoyan Tabakov <boyan.tabakov@futurice.com>2013-09-29 11:47:29 +0300
commit479631aafc525efef151309ac257e60c73230ac0 (patch)
tree37861481ca8fe6c26f78aa2edee3df1c7156eacd /lib/api/helpers.rb
parentcbb5b000c0c7593673683c08a402ea01a3a7f369 (diff)
downloadgitlab-ce-479631aafc525efef151309ac257e60c73230ac0.tar.gz
Extended User API to expose admin and can_create_group for user creation/updating.
Also, is_admin and can_create_group are exposed in the user information. Fixed attributes_for_keys to process properly keys with boolean values (since false.present? is false).
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 4f189f35196..860848b2995 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -82,7 +82,7 @@ module API
def attributes_for_keys(keys)
attrs = {}
keys.each do |key|
- attrs[key] = params[key] if params[key].present?
+ attrs[key] = params[key] if params[key].present? or (params.has_key?(key) and params[key] == false)
end
attrs
end