[midPoint] ScriptedSQL Connector and "Remove attribute value"
Wojciech Staszewski
wojciech.staszewski at diagnostyka.pl
Mon Oct 15 14:31:57 CEST 2018
Hello!
I know I asked about it some time ago, but I found no solution so far.
I have an attribute, single valued. Let's say "$user/jpegPhoto".
There is some ScriptedSQL resource with outbound mapping: $user/jpegPhoto -> ri:avatar.
I want to remove jpegPhoto from certain user and thus clear the avatar from database.
midPoint GUI:
Open user panel, click the trashcan icon next to jpegPhoto user attribute. Click "Save".
And this is the most interesting part - under the hood:
The UpdateScript.groovy is called, but the action is "UPDATE" instead of "REMOVE_ATTRIBUTE_VALUES".
And because it's "UPDATE" action and jpegPhoto attribute value is NULL (I've just removed it),
this condition: "if (attributes.get(attr) != null)" disables removing the value from database.
As an effect the avatar column stays untouched.
And if we have inbound mapping configured ri:avatar->$user/jpegPhoto, in the next step in midPoint the $user/jpegPhoto is restored.
My question is: why the "UPDATE" action is called and not "REMOVE_ATTRIBUTE_VALUES"?
Thanks! Regards,
WS
--
Wojciech Staszewski
Administrator Systemów Sieciowych
tel. kom: 663 680 236
www.diagnostyka.pl
Diagnostyka Sp. z o. o.
ul. Prof. M. Życzkowskiego 16, 31-864 Kraków
Numer KRS: 0000381559 (Sąd Rejonowy dla Krakowa-Śródmieścia w Krakowie, XI Wydział Gospodarczy KRS)
NIP: 675-12-65-009; REGON: 356366975
Kapitał zakładowy: 33 756 500 zł.
Pomyśl o środowisku zanim wydrukujesz ten e-mail.
More information about the midPoint
mailing list