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

Add posibility to fix malformed repository object through debug pages

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2 (Tycho)
    • Component/s: None
    • Labels:
      None

      Description

      1. Import role with reference on some other object
      e.g.
      <role xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
      xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3">
      <name>ExclusionRole</name>
      <inducement>
      <construction>
      <resourceRef oid="ef2bc95b-76e0-48e2-86d6-3d4f02d3eeee" type="c:ResourceType"/>
      <kind>account</kind>
      </construction>
      </inducement>
      <exclusion>
      <targetRef oid="63a3fa23-9cd6-46e4-ab4c-d8aee9e924b7" type="c:RoleType"/>
      <policy>enforce</policy>
      </exclusion>
      </role>
      2. Edit the imported role and enter to the ResourceType reference the value of the existing role oid
      e.g.
      <resourceRef oid="10000000-0000-0000-0000-000000000601" type="c:ResourceType"/>
      So the sense of this action is to past reference oid with another object type than it is mentioned in type="..."
      3. Save -> Save Success
      4. Try to open updated role in debug pages again. Select Configuration -> Repository Objects -> Role -> select the name of role you used (e.g. ExclusionRole)
      Result: error message is shown
      Couldn't load object.
      Load object (Gui)
      Cause: Error resolving object with oid '12345678-d34d-b33f-f00d-988888888889': Expected to find 'ResourceType' but found 'RoleType' (role:12345678-d34d-b33f-f00d-988888888889(SuperRole)). Bad OID in a reference?

      Role isn't opened. Default repository object (SystemConfiguration) is selected

      So the only way to fix this role is to delete it and then import again.
      It would be better to have the possibility to fix the role through debug pages

        Attachments

          Activity

            People

            Assignee:
            honchar Kate Honchar
            Reporter:
            honchar Kate Honchar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: