Lotus Notes Driver: Double Client License (ClientType) Values Inserted When Adding User



By: pnuffer

April 10, 2009 11:07 am

Reads: 189

Comments:0

Rating:0

Question: My Notes Driver’s policy inserts a specific ClientType field when new Notes users are created (Lotus Notes Driver Tip). After the creation is done, the new Notes User’s ClientType field has two entries on the person document. One of ’0′ representing Notes Client, and one of ’4′ representing Notes Administrator which was set by the driver’s policy. How do I get rid of the ’0′ – Notes Client value?

Answer: This problem can arise due to the Notes Driver registration process. As the Notes Driver registers users, the ClientType field is automatically populated, then the Notes driver policies add an additional attribute to the ClientType field. One way to fix this issue is to remove the ClientType value of 0 placed by the registration process from the person document, after the add command has completed.

First, insert the desired ClientType field value with driver policy. Place something similar to the following rule somewhere in the Creation Policy chain (or if you want to place it in the Command Transform Policy chain insert a <if-operation op=”equal”>add</if-operation> to the conditions):

 <rule>
  <description>Add Notes Client Type Field</description>
  <conditions>
   <and>
    <if-class-name op="equal">User</if-class-name>
    <if-op-attr name="Title" op="equal">Administrator</if-op-attr>
   </and>
  </conditions>
  <actions>
   <do-add-dest-attr-value class-name="User" name="ClientType">
    <arg-value type="string">
     <token-text xml:space="preserve">4</token-text>
    </arg-value>
   </do-add-dest-attr-value>
   <do-set-op-property name="remove-lotus-notes-client-type">
    <arg-string>
     <token-text>0</token-text>
    </arg-string>
   </do-set-op-property>
  </actions>
 </rule>
 

This example recognizes that the eDir Title attribute is set to Administrator…then sets the ClientType to 4. Your solution may not need to recognize any eDir attribute, but at least set the ClientType to some value other than the default ’0′. The following policy completes the work, by detecting the add-association and removing the value of ’0′ placed on the Notes person document by the Notes registration process. Place the following rule somewhere in the Input Transformation Policy chain:

 <rule>
  <description>Check add-association for operation data indicating the need to remove client type value of 'Lotus Notes'</description>
  <conditions>
   <and>
    <f-operation op="equal">add-association</if-operation>
    <if-op-property name="remove-lotus-notes-client-type" op="equal">0</if-op-property>
   </and>
  </conditions>
  <actions>
   <do-remove-src-attr-value name="ClientType">
    <arg-association>
     <token-xpath expression="./text()"/>
    </arg-association>
    <arg-value>
     <token-op-property name="remove-lotus-notes-client-type"/>
    </arg-value>
   </do-remove-src-attr-value>
  </actions>
 </rule>
 
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags: ,
Categories: Uncategorized

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Comment