diff options
author | Izaak Alpert <ialpert@blackberry.com> | 2013-08-08 22:09:33 +0400 |
---|---|---|
committer | Izaak Alpert <ialpert@blackberry.com> | 2013-09-11 22:04:15 +0400 |
commit | d4d4a78f834b409631b012aa555c0cb2c4e3166d (patch) | |
tree | 482c170d6c04b72ea3faeade89b8bc0cc6f73c8a /lib/api | |
parent | 694768e51870ebb24a25730188e018782d3175ca (diff) |
Update User api to respect default settings
-API now respects default_projects_limit, default_can_create_group, and default_can_create_team
Change-Id: I059d060d576df1050e5371e707381c5e8c608a7a
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/users.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 84256b51124..3b7ae9f01a1 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -46,7 +46,7 @@ module API authenticated_as_admin! required_attributes! [:email, :password, :name, :username] - attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit, :username, :extern_uid, :provider, :bio] + attrs = User.defaults.merge(attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit, :username, :extern_uid, :provider, :bio]) user = User.new attrs, as: :admin if user.save present user, with: Entities::User |