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

Creating user at the same time as assigning organization that is used to compute user/name passes incorrect value to resource outbounds

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.0 (Newton)
    • 3.0 (Newton)
    • None
    • None

    Description

      1. creating user (New User), filling:

      • givenName
      • familyName
      • employeeType
      • assigning organization
      • adding resource account(s)
        2. default user template computes the user/name attribute as follows:
      • if employeeType == 'Vendor' (this is true)
      • get users organizations, take the first (assumption: user will be in one organization, or we get any of them)
      • get the organization name
      • user it as user/name: organization + '.' + familyName
        tmpOrgList = midpoint.getOrgUnits(user)
        if (tmpOrgList.size() >= 1) {
        
        	tmpOrgIterator = tmpOrgList.iterator().next()
        	tmpOrgObject = midpoint.getOrgByOid(tmpOrgIterator)
        	tmpOrganization = basic.getPropertyValue(tmpOrgObject, 'identifier') ? \
        		basic.norm(basic.stringify(basic.getPropertyValue(tmpOrgObject, 'identifier'))) : basic.norm(basic.stringify(basic.getPropertyValue(tmpOrgObject, 'name')))?.tokenize(' ')[0]
        //	tmpOrganization = basic.norm(basic.stringify(basic.getPropertyValue(tmpOrgObject, 'identifier')))
        //	tmpOrganization = basic.norm(basic.stringify(basic.getPropertyValue(tmpOrgObject, 'name')))?.tokenize(' ')[0]
        }
        else if (tmpOrgList.size() == 0)
        	tmpOrganization = ''
        
        if (!basic.isEmpty(tmpOrganization)) {
        	tmpString = tmpOrganization + '.' + tmpFamilyName
        } else tmpString = tmpFamilyName
        
        upToNCharacters = tmpString?.substring(0, Math.min(tmpString?.length(), 18));
        
        upToNCharacters + iterationToken
        

      3. resource computes icfs:name as:

      					<outbound>
      						<source>
      							<path>$user/name</path>
      						</source>
      						<expression>
      							<script>
      <code>
      'CN=' + name + '_a,OU=Administrators,...'
      </code>
      							</script>
      						</expression>
      					</outbound>
      
      

      This should end with creating user such as "company.lastname" and account "CN=company.lastname_a,OU=Administrators,..."

      But account "CN=lastname_a,OU=Administrators,..." is created.

      Attachments

        Issue Links

          Activity

            People

              vix Ivan Noris
              vix Ivan Noris
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: