[midPoint] remove attribute value (ScriptedSQL)

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Wed Nov 22 20:49:03 CET 2017


Hello!

I have an attribute defined in resource with "authoritative" mapping.
It means that if I remove this attribute from user in midPoint, it
should be removed from the resource account as well. It's about my
famous "stamp". :)
If I push "remove" icon on the user panel and save, nothing happens. The
attribute still exists in the resource (and reconciliation restores this
attribute to IDM user).
The UpdateScript.groovy is entering "UPDATE" action (msg: Entering
UPDATE Script), but the condition:
[...]
for (attr in accountAttrNames) {
            if (attributes.get(attr) != null) {
[...]
prevents the attribute from being removed from resource, as it is null
(i think).
I don't want to make a condition: if (attributes.get("stamp") = null) {
"remove_the_attribute_from_resource" }
because it will try to remove this attribute from resource everytime for
every user that has stamp attribute empty.

But shouldn't the action be rather "REMOVE_ATTRIBUTE_VALUES"? Or this
action is restricted for multi-valued attributes only?
Regards!
WS



More information about the midPoint mailing list