Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-741

[psp] Replace script attribute definitions with a custom attribute definition for filtering change log names.

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.1.0
    • None
    • provisioning
    • None

    Description

      This script attribute definition appears multiple times, and should be replaced by a custom attribute definition :

      <!-- The value of the "groupNameInStem" attribute is the name of the group of a change log entry. The name of the group
      is returned only if the group is a child of the stem whose name is the edu.internet2.middleware.psp.baseStem property. If
      the edu.internet2.middleware.psp.baseStem property is the root stem, groups under the "etc" stem are omitted. -->
      <resolver:AttributeDefinition
      id="groupNameInStem"
      xsi:type="ad:Script">
      <!-- Dependencies which return a "name" attribute whose value is the group name. -->
      <resolver:Dependency ref="GroupDataConnector" />
      <resolver:Dependency ref="DeleteGroupChangeLogDataConnector" />
      <resolver:Dependency ref="UpdateGroupNameChangeLogDataConnector" />
      <resolver:Dependency ref="UpdateGroupDescriptionChangeLogDataConnector" />
      <resolver:Dependency ref="GroupAttributeAssignValueChangeLogDataConnector" />
      <ad:Script><![CDATA[
      // Import Shibboleth attribute provider.
      importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);

      // Create the attribute to be returned.
      groupNameInStem = new BasicAttribute("groupNameInStem")

      // Return the group name if it is a child of the base stem to be provisioned, omitting 'etc'.
      if (typeof name != "undefined" && name != null ) {
      // The name of the base stem to be provisioned.
      var scriptBaseStem = "${edu.internet2.middleware.psp.baseStem}";

      // If the base stem is the root stem, ignore groups under the 'etc' stem.
      if (scriptBaseStem.length == 0) {
      if (name.getValues().get(0).lastIndexOf("etc:", 0) === -1)

      { groupNameInStem.getValues().add(name.getValues().get(0)); }

      // Return the group name if it starts with the base stem to be provisioned.
      } else {
      if (name.getValues().get(0).lastIndexOf(scriptBaseStem + ":", 0) != -1)

      { groupNameInStem.getValues().add(name.getValues().get(0)); }

      }
      }
      ]]></ad:Script>
      </resolver:AttributeDefinition>

      Attachments

        Activity

          People

            tom.zeller.2@at.internet2.edu Tom Zeller
            tom.zeller.2@at.internet2.edu Tom Zeller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: