* when subcsriber preferences are modified, keys
are checked against a subscriber profile and if any of them
is not accessible (disabled in the assigned profile) a 422
error is now raised. That is mostly relevant for PATCH
"op":"add" that returned 204 OK before regardless. This change
only affects access to /api/subscriberpreferences by the 'subscriber'
and the 'subscriberadmin' roles
* Controller::API::SubscriberPreferencesItem: remove unintended "last" from
catch {}.
* Utils::Preferences: remove 2 debug lines.
Change-Id: Ie20e5b8d4420c814bc786c34ddd952ee13d355ae
&$err_code(HTTP_UNPROCESSABLE_ENTITY,"The entity could not be processed: A pointer that references a non-existent value (pointer: /$pref)","requested profile preference '$pref' is not enabled");
return;
}
try{
my$vtype=ref$resource->{$pref};
my$maxlen=128;
@ -982,7 +991,6 @@ sub update_preferences {
};
my($stmt,@bind_vals)=@{${$pref_rs->as_query}};
@bind_vals=map{$_->[1];}@bind_vals;
$c->log->debug("preferences update rs with sql: ".$stmt." and bind values: ".join(",",@bind_vals));