Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-2499

User Template does not allow absolute mode for multivalue attribute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2 (Tycho)
    • Fix Version/s: 3.3 (Lincoln)
    • Component/s: None
    • Labels:
      None

      Description

      I have custom user attribute, which is multivalued:
      <xsd:element name="pubkey" type="xsd:string" minOccurs="0" maxOccurs="unbounded">

      Then I have mapping in Default User Template:
      <mapping>
      <strength>strong</strength>
      <expression>
      <script>
      <relativityMode>absolute</relativityMode>
      <code>
      List ret = new java.util.ArrayList();
      ret.add("NEW VALUE to overwrite all other")
      ret
      </code>
      </script>
      </expression>
      <target>
      <c:path>$c:user/c:extension/pubkey</c:path>
      </target>
      </mapping>

      I tried any option I think there is available in MP (including authoritative=true) but I cannot achieve ABSOLUTE setting of the "pubkey" attribute. That means e.g. user has 3 values in the "pubkey" attribute and I need to overwrite it with just one (or two..) values. The current behaviour is that it always ADDs value, instead of Remove/replace. Such mechanism works good on resource level, but probably missing in Object template.

      Attaching log with Model trace.

        Attachments

          Activity

            People

            Assignee:
            martin.lizner Martin Lizner
            Reporter:
            martin.lizner Martin Lizner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: