Novell Home

Brain Teaser: Debugging a Group Move

Novell Cool Solutions: Feature

Digg This - Slashdot This

Posted: 13 Jan 2005
 

Instructions: Read the problem statement and code sample below and find the error(s). Once you've got it solved, reply to Cool Guys and describe your solution - and if you're one of the first 2 to respond with the correct answer, you'll win a free T-shirt. Easy as that!


I am having problems moving a user from one group to another with IDM2. The Group Membership on the user is moved fine, so that after the operation, the user is a member of the correct group. However, in the "member" attribute of the old group, the user is still present. The user is also present in the member attribute of the new group. I have tried the code below to explicitly remove the user from both the group and the member, but it doesn't work, even though the trace says "Success" for the operation.

Here's the problem code I've been using:


<xsl:variable name="removegroupmembership")
 <modify class-name="User">
    <xsl:attribute name="dest-dn">
	<xsl:value-of select="$userdn"/>
    </xsl:attribute>
    <modify-attr attr-name="Group Membership">
      <remove-all-values/>
    </modify-attr>
  </modify>
  <modify class-name="Group">
    <xsl:attribute name="dest-dn">
	<xsl:value-of select="currentdn"/>
    </xsl:attribute>
    <modify-attr attr-name="Member">
	<remove-value type="dn">
	   <xsl:value-of select="$userdn"/>
	</remove-value>
    </modify-attr>
  </modify>
</xsl:variable>
<xsl:variable name="resultgroupmembership" select="cmd:execute
($destCommandProcessor,$removegroupmembership)"/>

What should I do to make this work?


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell