From 479631aafc525efef151309ac257e60c73230ac0 Mon Sep 17 00:00:00 2001 From: Boyan Tabakov Date: Wed, 31 Jul 2013 13:52:23 +0300 Subject: 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). --- lib/api/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/api/helpers.rb') 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 -- cgit v1.2.1