app/controllers/spree/api/users_controller.rb in solidus_api-1.1.0.pre1 vs app/controllers/spree/api/users_controller.rb in solidus_api-1.1.0.pre2
- old
+ new
@@ -13,8 +13,12 @@
def user_params
permitted_resource_params
end
def permitted_resource_attributes
- super | [bill_address_attributes: permitted_address_attributes, ship_address_attributes: permitted_address_attributes]
+ if action_name == "create" || can?(:update_email, user)
+ super | [:email]
+ else
+ super
+ end
end
end