Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-9615

The conditionalRoles.js script should not create an empty roles array if no conditional roles are assigned

    Details

      Description

      The conditionalRoles.js script will create a roles[] in the referenced object regardless of whether conditional roles have been assigned. In ManagedObjectSet#update, following the invocation of the onUpdate script hook (which triggers the invocation of conditionalRoles.js), updateRelationshipFields is called to determine the total set of edges which should be validated. Because an empty roles array is created by conditionalRoles.js, updateRelationshipFields will flag this as a difference, often because the oldObject does not contain a roles[]. This, in turn, causes a read of the roles relationship (so diff logic can be correctly applied), which is superfluous overhead. 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dhogan Dirk Hogan
                Reporter:
                dhogan Dirk Hogan
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: