Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC "policy-builder-dtd" "D:\Designer\plugins\com.novell.idm.policybuilder_4.0.0.201404231247\DTD\dirxmlscript4.0.2.dtd"><policy xmlns:jdbc="urn:dirxml:jdbc">
- <rule>
- <description>Set variables</description>
- <conditions>
- <and/>
- </conditions>
- <actions>
- <do-set-local-variable name="p_NAME" scope="policy">
- <arg-string>
- <token-attr name="uniqueID"/>
- </arg-string>
- </do-set-local-variable>
- <do-set-local-variable name="p_EMAIL" scope="policy">
- <arg-string>
- <token-attr name="Internet EMail Address"/>
- </arg-string>
- </do-set-local-variable>
- <do-set-local-variable name="p_MOBILEPHONENUMBER" scope="policy">
- <arg-string>
- <token-attr name="Telephone Number"/>
- </arg-string>
- </do-set-local-variable>
- <do-set-local-variable name="p_FIRSTNAME" scope="policy">
- <arg-string>
- <token-attr name="Given Name"/>
- </arg-string>
- </do-set-local-variable>
- <do-set-local-variable name="p_SURNAME" scope="policy">
- <arg-string>
- <token-attr name="surname"/>
- </arg-string>
- </do-set-local-variable>
- <do-if>
- <arg-conditions>
- <and>
- <if-op-attr mode="nocase" name="Login Disabled" op="changing-to">TRUE</if-op-attr>
- </and>
- </arg-conditions>
- <arg-actions>
- <do-set-local-variable name="p_BUSY" scope="policy">
- <arg-string>
- <token-text xml:space="preserve">1</token-text>
- </arg-string>
- </do-set-local-variable>
- </arg-actions>
- <arg-actions>
- <do-set-local-variable name="p_BUSY" scope="policy">
- <arg-string>
- <token-text xml:space="preserve">0</token-text>
- </arg-string>
- </do-set-local-variable>
- </arg-actions>
- </do-if>
- <do-set-local-variable name="p_MANAGERNAME" scope="policy">
- <arg-string>
- <token-text xml:space="preserve">NA</token-text>
- </arg-string>
- </do-set-local-variable>
- <do-for-each>
- <arg-node-set>
- <token-entitlement name="UserAccount"/>
- </arg-node-set>
- <arg-actions>
- <do-set-local-variable name="p_ROLEID" scope="policy">
- <arg-string>
- <token-local-variable name="current-node"/>
- </arg-string>
- </do-set-local-variable>
- </arg-actions>
- </do-for-each>
- <do-if>
- <arg-conditions>
- <and>
- <if-entitlement name="isAdmin" op="available"/>
- </and>
- </arg-conditions>
- <arg-actions>
- <do-set-local-variable name="p_ADMINISTRATOR" scope="policy">
- <arg-string>
- <token-text xml:space="preserve">1</token-text>
- </arg-string>
- </do-set-local-variable>
- </arg-actions>
- <arg-actions>
- <do-set-local-variable name="p_ADMINISTRATOR" scope="policy">
- <arg-string>
- <token-text xml:space="preserve">0</token-text>
- </arg-string>
- </do-set-local-variable>
- </arg-actions>
- </do-if>
- </actions>
- </rule>
- <rule notrace="true">
- <description>Add Store Procedure Call</description>
- <conditions>
- <and/>
- </conditions>
- <actions>
- <do-append-xml-element expression=".." name="jdbc:statement"/>
- <do-append-xml-element expression="../jdbc:statement" name="password"/>
- <do-append-xml-text expression="../jdbc:statement/password" notrace="true">
- <arg-string>
- <token-attr name="nspmDistributionPassword"/>
- </arg-string>
- </do-append-xml-text>
- <do-append-xml-element expression="../jdbc:statement" name="jdbc:call-procedure"/>
- <do-set-xml-attr expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:name">
- <arg-string>
- <token-global-variable name="stored-procedure-name"/>
- </arg-string>
- </do-set-xml-attr>
- <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
- <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]" name="jdbc:value"/>
- <do-append-xml-text expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]/jdbc:value[last()]">
- <arg-string>
- <token-local-variable name="p_NAME"/>
- </arg-string>
- </do-append-xml-text>
- <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
- <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]" name="jdbc:value"/>
- <do-append-xml-text expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]/jdbc:value[last()]">
- <arg-string>
- <token-text xml:space="preserve">{$$password}</token-text>
- </arg-string>
- </do-append-xml-text>
- <do-for-each>
- <arg-node-set>
- <token-split delimiter=";">
- <token-text xml:space="preserve">p_ADMINISTRATOR;p_EMAIL;p_ROLEID;p_BUSY;p_MOBILEPHONENUMBER;p_FIRSTNAME;p_SURNAME;p_MANAGERNAME</token-text>
- </token-split>
- </arg-node-set>
- <arg-actions>
- <do-trace-message>
- <arg-string/>
- </do-trace-message>
- <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
- <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure[last()]/jdbc:param[last()]" name="jdbc:value"/>
- <do-append-xml-text expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]/jdbc:value[last()]">
- <arg-string>
- <token-local-variable name="$current-node$"/>
- </arg-string>
- </do-append-xml-text>
- </arg-actions>
- </do-for-each>
- <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
- <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
- </actions>
- </rule>
- <rule>
- <description>Add payload data</description>
- <conditions>
- <and>
- <if-class-name mode="nocase" op="equal">User</if-class-name>
- </and>
- </conditions>
- <actions>
- <do-set-op-property name="userDN">
- <arg-string>
- <token-src-dn/>
- </arg-string>
- </do-set-op-property>
- <do-set-op-property name="operation">
- <arg-string>
- <token-operation/>
- </arg-string>
- </do-set-op-property>
- <do-if>
- <arg-conditions>
- <and>
- <if-association op="available"/>
- </and>
- </arg-conditions>
- <arg-actions>
- <do-set-op-property name="association">
- <arg-string>
- <token-association/>
- </arg-string>
- </do-set-op-property>
- </arg-actions>
- <arg-actions/>
- </do-if>
- <do-if>
- <arg-conditions>
- <and>
- <if-operation mode="case" op="equal">delete</if-operation>
- </and>
- </arg-conditions>
- <arg-actions>
- <do-set-op-property name="fullname">
- <arg-string>
- <token-src-attr name="Given Name"/>
- <token-text xml:space="preserve"> </token-text>
- <token-src-attr name="Surname"/>
- </arg-string>
- </do-set-op-property>
- <do-set-op-property name="uniqueID">
- <arg-string>
- <token-src-attr name="uniqueID"/>
- </arg-string>
- </do-set-op-property>
- </arg-actions>
- <arg-actions>
- <do-set-op-property name="fullname">
- <arg-string>
- <token-src-attr name="Full Name" notrace="true"/>
- </arg-string>
- </do-set-op-property>
- <do-set-op-property name="uniqueID">
- <arg-string>
- <token-src-attr name="uniqueID" notrace="true"/>
- </arg-string>
- </do-set-op-property>
- </arg-actions>
- </do-if>
- <do-if>
- <arg-conditions>
- <and>
- <if-operation op="equal">modify</if-operation>
- </and>
- </arg-conditions>
- <arg-actions>
- <do-set-op-property name="fullname">
- <arg-string>
- <token-src-attr name="Full Name"/>
- </arg-string>
- </do-set-op-property>
- <do-set-op-property name="userDN">
- <arg-string>
- <token-src-dn/>
- </arg-string>
- </do-set-op-property>
- </arg-actions>
- <arg-actions>
- <do-set-op-property name="fullname">
- <arg-string>
- <token-src-attr name="Full Name"/>
- </arg-string>
- </do-set-op-property>
- <do-set-op-property name="userDN">
- <arg-string>
- <token-src-dn/>
- </arg-string>
- </do-set-op-property>
- </arg-actions>
- </do-if>
- <do-if>
- <arg-conditions>
- <and>
- <if-operation op="equal">remove-association</if-operation>
- </and>
- </arg-conditions>
- <arg-actions>
- <do-set-op-property name="userDN">
- <arg-string>
- <token-src-dn/>
- </arg-string>
- </do-set-op-property>
- <do-set-op-property name="fullname">
- <arg-string>
- <token-src-attr name="Full Name"/>
- </arg-string>
- </do-set-op-property>
- </arg-actions>
- <arg-actions>
- <do-set-op-property name="userDN">
- <arg-string>
- <token-src-dn/>
- </arg-string>
- </do-set-op-property>
- <do-set-op-property name="fullname">
- <arg-string>
- <token-src-attr name="Full Name"/>
- </arg-string>
- </do-set-op-property>
- </arg-actions>
- </do-if>
- <do-if>
- <arg-conditions>
- <and>
- <if-operation mode="case" op="equal">modify</if-operation>
- <if-op-attr name="nspmDistributionPassword" op="changing"/>
- </and>
- </arg-conditions>
- <arg-actions>
- <do-set-xml-attr expression="." name="event-id">
- <arg-string>
- <token-text xml:space="preserve">pwd-subscribe</token-text>
- </arg-string>
- </do-set-xml-attr>
- </arg-actions>
- <arg-actions/>
- </do-if>
- </actions>
- </rule>
- </policy>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement