Hi,

Im using a null-driver to create croups based on an attribute from the
user object.
If the group exists it should only add the user to the group not create
the group.

How do I write the condition for this ?
Thanks
Joakim

This is my current code:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC
"policy-builder-dtd" "C:\Program
Files\Novell\Designer\eclipse\plugins\com.novell.i dm.policybuilder_3.0.0.200807211539\DTD\dirxmlscri pt3.6.dtd"><policy>
<rule>
<description>Create groups for cc</description>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-op-attr name="costCenter" op="available"/>
</and>
</conditions>
<actions>
<do-add-src-object class-name="Group">
<arg-dn>
<token-global-variable name="cc-group-context"/>
<token-op-attr name="costCenter"/>
</arg-dn>
</do-add-src-object>
<do-add-src-attr-value class-name="Group" name="Object Class">
<arg-dn>
<token-global-variable name="cc-group-context"/>
<token-op-attr name="costCenter"/>
</arg-dn>
<arg-value>
<token-text xml:space="preserve">Top</token-text>
</arg-value>
</do-add-src-attr-value>
<do-add-src-attr-value class-name="Group" name="Object Class">
<arg-dn>
<token-global-variable name="cc-group-context"/>
<token-op-attr name="costCenter"/>
</arg-dn>
<arg-value>
<token-text xml:space="preserve">Group</token-text>
</arg-value>
</do-add-src-attr-value>
</actions>
</rule>
<rule>
<description>Add members to cc groups</description>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-op-attr name="costCenter" op="available"/>
</and>
</conditions>
<actions>
<do-add-src-attr-value class-name="Group" name="Member">
<arg-dn>
<token-global-variable name="cc-group-context"/>
<token-op-attr name="costCenter"/>
</arg-dn>
<arg-value type="dn">
<token-src-dn/>
</arg-value>
</do-add-src-attr-value>
<do-add-src-attr-value class-name="Group" name="Equivalent To Me">
<arg-dn>
<token-global-variable name="cc-group-context"/>
<token-op-attr name="costCenter"/>
</arg-dn>
<arg-value type="dn">
<token-src-dn/>
</arg-value>
</do-add-src-attr-value>
<do-add-src-attr-value class-name="User" name="Group Membership">
<arg-dn>
<token-src-dn/>
</arg-dn>
<arg-value type="dn">
<token-global-variable name="cc-group-context"/>
<token-op-attr name="costCenter"/>
</arg-value>
</do-add-src-attr-value>
<do-add-src-attr-value class-name="User" name="Security Equals">
<arg-dn>
<token-src-dn/>
</arg-dn>
<arg-value type="dn">
<token-global-variable name="cc-group-context"/>
<token-op-attr name="costCenter"/>
</arg-value>
</do-add-src-attr-value>
</actions>
</rule>
<rule>
<description>Veto all</description>
<conditions>
<and/>
</conditions>
<actions>
<do-veto/>
</actions>
</rule>
</policy>


--
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: http://forums.novell.com/member.php?userid=6236
View this thread: http://forums.novell.com/showthread.php?t=350130