Advertisement
Guest User

DirXML-Policy SIRA

a guest
Jun 16th, 2015
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 9.40 KB | None | 0 0
  1. <?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">
  2.     <rule>
  3.         <description>Set variables</description>
  4.         <conditions>
  5.             <and/>
  6.         </conditions>
  7.         <actions>
  8.             <do-set-local-variable name="p_NAME" scope="policy">
  9.                 <arg-string>
  10.                     <token-attr name="uniqueID"/>
  11.                 </arg-string>
  12.             </do-set-local-variable>
  13.             <do-set-local-variable name="p_EMAIL" scope="policy">
  14.                 <arg-string>
  15.                     <token-attr name="Internet EMail Address"/>
  16.                 </arg-string>
  17.             </do-set-local-variable>
  18.             <do-set-local-variable name="p_MOBILEPHONENUMBER" scope="policy">
  19.                 <arg-string>
  20.                     <token-attr name="Telephone Number"/>
  21.                 </arg-string>
  22.             </do-set-local-variable>
  23.             <do-set-local-variable name="p_FIRSTNAME" scope="policy">
  24.                 <arg-string>
  25.                     <token-attr name="Given Name"/>
  26.                 </arg-string>
  27.             </do-set-local-variable>
  28.             <do-set-local-variable name="p_SURNAME" scope="policy">
  29.                 <arg-string>
  30.                     <token-attr name="surname"/>
  31.                 </arg-string>
  32.             </do-set-local-variable>
  33.             <do-if>
  34.                 <arg-conditions>
  35.                     <and>
  36.                         <if-op-attr mode="nocase" name="Login Disabled" op="changing-to">TRUE</if-op-attr>
  37.                     </and>
  38.                 </arg-conditions>
  39.                 <arg-actions>
  40.                     <do-set-local-variable name="p_BUSY" scope="policy">
  41.                         <arg-string>
  42.                             <token-text xml:space="preserve">1</token-text>
  43.                         </arg-string>
  44.                     </do-set-local-variable>
  45.                 </arg-actions>
  46.                 <arg-actions>
  47.                     <do-set-local-variable name="p_BUSY" scope="policy">
  48.                         <arg-string>
  49.                             <token-text xml:space="preserve">0</token-text>
  50.                         </arg-string>
  51.                     </do-set-local-variable>
  52.                 </arg-actions>
  53.             </do-if>
  54.             <do-set-local-variable name="p_MANAGERNAME" scope="policy">
  55.                 <arg-string>
  56.                     <token-text xml:space="preserve">NA</token-text>
  57.                 </arg-string>
  58.             </do-set-local-variable>
  59.             <do-for-each>
  60.                 <arg-node-set>
  61.                     <token-entitlement name="UserAccount"/>
  62.                 </arg-node-set>
  63.                 <arg-actions>
  64.                     <do-set-local-variable name="p_ROLEID" scope="policy">
  65.                         <arg-string>
  66.                             <token-local-variable name="current-node"/>
  67.                         </arg-string>
  68.                     </do-set-local-variable>
  69.                 </arg-actions>
  70.             </do-for-each>
  71.             <do-if>
  72.                 <arg-conditions>
  73.                     <and>
  74.                         <if-entitlement name="isAdmin" op="available"/>
  75.                     </and>
  76.                 </arg-conditions>
  77.                 <arg-actions>
  78.                     <do-set-local-variable name="p_ADMINISTRATOR" scope="policy">
  79.                         <arg-string>
  80.                             <token-text xml:space="preserve">1</token-text>
  81.                         </arg-string>
  82.                     </do-set-local-variable>
  83.                 </arg-actions>
  84.                 <arg-actions>
  85.                     <do-set-local-variable name="p_ADMINISTRATOR" scope="policy">
  86.                         <arg-string>
  87.                             <token-text xml:space="preserve">0</token-text>
  88.                         </arg-string>
  89.                     </do-set-local-variable>
  90.                 </arg-actions>
  91.             </do-if>
  92.         </actions>
  93.     </rule>
  94.     <rule notrace="true">
  95.         <description>Add Store Procedure Call</description>
  96.         <conditions>
  97.             <and/>
  98.         </conditions>
  99.         <actions>
  100.             <do-append-xml-element expression=".." name="jdbc:statement"/>
  101.             <do-append-xml-element expression="../jdbc:statement" name="password"/>
  102.             <do-append-xml-text expression="../jdbc:statement/password" notrace="true">
  103.                 <arg-string>
  104.                     <token-attr name="nspmDistributionPassword"/>
  105.                 </arg-string>
  106.             </do-append-xml-text>
  107.             <do-append-xml-element expression="../jdbc:statement" name="jdbc:call-procedure"/>
  108.             <do-set-xml-attr expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:name">
  109.                 <arg-string>
  110.                     <token-global-variable name="stored-procedure-name"/>
  111.                 </arg-string>
  112.             </do-set-xml-attr>
  113.             <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
  114.             <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]" name="jdbc:value"/>
  115.             <do-append-xml-text expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]/jdbc:value[last()]">
  116.                 <arg-string>
  117.                     <token-local-variable name="p_NAME"/>
  118.                 </arg-string>
  119.             </do-append-xml-text>
  120.             <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
  121.             <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]" name="jdbc:value"/>
  122.             <do-append-xml-text expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]/jdbc:value[last()]">
  123.                 <arg-string>
  124.                     <token-text xml:space="preserve">{$$password}</token-text>
  125.                 </arg-string>
  126.             </do-append-xml-text>
  127.             <do-for-each>
  128.                 <arg-node-set>
  129.                     <token-split delimiter=";">
  130.                         <token-text xml:space="preserve">p_ADMINISTRATOR;p_EMAIL;p_ROLEID;p_BUSY;p_MOBILEPHONENUMBER;p_FIRSTNAME;p_SURNAME;p_MANAGERNAME</token-text>
  131.                     </token-split>
  132.                 </arg-node-set>
  133.                 <arg-actions>
  134.                     <do-trace-message>
  135.                         <arg-string/>
  136.                     </do-trace-message>
  137.                     <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
  138.                     <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure[last()]/jdbc:param[last()]" name="jdbc:value"/>
  139.                     <do-append-xml-text expression="../jdbc:statement/jdbc:call-procedure/jdbc:param[last()]/jdbc:value[last()]">
  140.                         <arg-string>
  141.                             <token-local-variable name="$current-node$"/>
  142.                         </arg-string>
  143.                     </do-append-xml-text>
  144.                 </arg-actions>
  145.             </do-for-each>
  146.             <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
  147.             <do-append-xml-element expression="../jdbc:statement/jdbc:call-procedure" name="jdbc:param"/>
  148.         </actions>
  149.     </rule>
  150.     <rule>
  151.         <description>Add payload data</description>
  152.         <conditions>
  153.             <and>
  154.                 <if-class-name mode="nocase" op="equal">User</if-class-name>
  155.             </and>
  156.         </conditions>
  157.         <actions>
  158.             <do-set-op-property name="userDN">
  159.                 <arg-string>
  160.                     <token-src-dn/>
  161.                 </arg-string>
  162.             </do-set-op-property>
  163.             <do-set-op-property name="operation">
  164.                 <arg-string>
  165.                     <token-operation/>
  166.                 </arg-string>
  167.             </do-set-op-property>
  168.             <do-if>
  169.                 <arg-conditions>
  170.                     <and>
  171.                         <if-association op="available"/>
  172.                     </and>
  173.                 </arg-conditions>
  174.                 <arg-actions>
  175.                     <do-set-op-property name="association">
  176.                         <arg-string>
  177.                             <token-association/>
  178.                         </arg-string>
  179.                     </do-set-op-property>
  180.                 </arg-actions>
  181.                 <arg-actions/>
  182.             </do-if>
  183.             <do-if>
  184.                 <arg-conditions>
  185.                     <and>
  186.                         <if-operation mode="case" op="equal">delete</if-operation>
  187.                     </and>
  188.                 </arg-conditions>
  189.                 <arg-actions>
  190.                     <do-set-op-property name="fullname">
  191.                         <arg-string>
  192.                             <token-src-attr name="Given Name"/>
  193.                             <token-text xml:space="preserve"> </token-text>
  194.                             <token-src-attr name="Surname"/>
  195.                         </arg-string>
  196.                     </do-set-op-property>
  197.                     <do-set-op-property name="uniqueID">
  198.                         <arg-string>
  199.                             <token-src-attr name="uniqueID"/>
  200.                         </arg-string>
  201.                     </do-set-op-property>
  202.                 </arg-actions>
  203.                 <arg-actions>
  204.                     <do-set-op-property name="fullname">
  205.                         <arg-string>
  206.                             <token-src-attr name="Full Name" notrace="true"/>
  207.                         </arg-string>
  208.                     </do-set-op-property>
  209.                     <do-set-op-property name="uniqueID">
  210.                         <arg-string>
  211.                             <token-src-attr name="uniqueID" notrace="true"/>
  212.                         </arg-string>
  213.                     </do-set-op-property>
  214.                 </arg-actions>
  215.             </do-if>
  216.             <do-if>
  217.                 <arg-conditions>
  218.                     <and>
  219.                         <if-operation op="equal">modify</if-operation>
  220.                     </and>
  221.                 </arg-conditions>
  222.                 <arg-actions>
  223.                     <do-set-op-property name="fullname">
  224.                         <arg-string>
  225.                             <token-src-attr name="Full Name"/>
  226.                         </arg-string>
  227.                     </do-set-op-property>
  228.                     <do-set-op-property name="userDN">
  229.                         <arg-string>
  230.                             <token-src-dn/>
  231.                         </arg-string>
  232.                     </do-set-op-property>
  233.                 </arg-actions>
  234.                 <arg-actions>
  235.                     <do-set-op-property name="fullname">
  236.                         <arg-string>
  237.                             <token-src-attr name="Full Name"/>
  238.                         </arg-string>
  239.                     </do-set-op-property>
  240.                     <do-set-op-property name="userDN">
  241.                         <arg-string>
  242.                             <token-src-dn/>
  243.                         </arg-string>
  244.                     </do-set-op-property>
  245.                 </arg-actions>
  246.             </do-if>
  247.             <do-if>
  248.                 <arg-conditions>
  249.                     <and>
  250.                         <if-operation op="equal">remove-association</if-operation>
  251.                     </and>
  252.                 </arg-conditions>
  253.                 <arg-actions>
  254.                     <do-set-op-property name="userDN">
  255.                         <arg-string>
  256.                             <token-src-dn/>
  257.                         </arg-string>
  258.                     </do-set-op-property>
  259.                     <do-set-op-property name="fullname">
  260.                         <arg-string>
  261.                             <token-src-attr name="Full Name"/>
  262.                         </arg-string>
  263.                     </do-set-op-property>
  264.                 </arg-actions>
  265.                 <arg-actions>
  266.                     <do-set-op-property name="userDN">
  267.                         <arg-string>
  268.                             <token-src-dn/>
  269.                         </arg-string>
  270.                     </do-set-op-property>
  271.                     <do-set-op-property name="fullname">
  272.                         <arg-string>
  273.                             <token-src-attr name="Full Name"/>
  274.                         </arg-string>
  275.                     </do-set-op-property>
  276.                 </arg-actions>
  277.             </do-if>
  278.             <do-if>
  279.                 <arg-conditions>
  280.                     <and>
  281.                         <if-operation mode="case" op="equal">modify</if-operation>
  282.                         <if-op-attr name="nspmDistributionPassword" op="changing"/>
  283.                     </and>
  284.                 </arg-conditions>
  285.                 <arg-actions>
  286.                     <do-set-xml-attr expression="." name="event-id">
  287.                         <arg-string>
  288.                             <token-text xml:space="preserve">pwd-subscribe</token-text>
  289.                         </arg-string>
  290.                     </do-set-xml-attr>
  291.                 </arg-actions>
  292.                 <arg-actions/>
  293.             </do-if>
  294.         </actions>
  295.     </rule>
  296. </policy>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement