Commit fa64652dc969023a65f3b393dbed1c40b7a45a79
1 parent
f90edb62
Exists in
master
Update patch params
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
app/controllers/scim_rails/scim_users_controller.rb
... | ... | @@ -80,8 +80,12 @@ module ScimRails |
80 | 80 | user_params.merge!({ postal_code: postal_code }) |
81 | 81 | end |
82 | 82 | |
83 | + if ScimRails.config.constant_user_attributes | |
84 | + user_params.merge!(ScimRails.config.constant_user_attributes) | |
85 | + end | |
86 | + | |
83 | 87 | ScimRails.config.mutable_user_attributes.each do |attribute| |
84 | - param = operations.find { |operation| operation["path"] == path_for(attribute).map { |x| x.to_s }.join(".") } rescue nil | |
88 | + param = operations.find { |operation| operation["path"] == path_for(attribute, ScimRails.config.patch_user_attributes_schema).map { |x| x.to_s }.join(".") } rescue nil | |
85 | 89 | user_params[attribute] = param["value"] if param.present? |
86 | 90 | end |
87 | 91 | ... | ... |