I'm trying to add al users having "plateforme-calcul" in their
"description" to the group "group1" (which already exist).

Here a sample of a user's ldif config
cn: user1
[...]
description: plateforme-calcul


Here a sample of the actual group1
cn: group1
objectClass: posixGroup
gidNumber: 512

Here what I want for the group1
 cn: group1
objectClass: posixGroup
gidNumber: 512
memberUid: user1
 memberUid: user2
...



Here my update task :
   <task>

      <name>UpdateGroup</name>
      <bean>org.lsc.beans.SimpleBean</bean>

      <ldapSourceService>
        <name>ldap-src-service-group1</name>
        <connection reference="ldap-site1-conn" />
        <baseDn>ou=site,ou=comptes,dc=MyDomain,dc=int</baseDn>

        <pivotAttributes>
          <string>cn</string>
        </pivotAttributes>
        <fetchedAttributes>
          <string>cn</string>
        </fetchedAttributes>

        <getAllFilter>(description=platforme-calcul)</getAllFilter>

<getOneFilter>(&amp;(objectClass=posixAccount)(cn={cn}))</getOneFilter>
      </ldapSourceService>
<!-- ########################### -->

      <ldapDestinationService>
         <name>ldap-dst-service-group1</name>
         <connection reference="ldap-site1-conn" />
         <baseDn>ou=groupes,dc=MyDomain,dc=int</baseDn>
         <pivotAttributes>
            <string>memberUid</string>
         </pivotAttributes>
         <fetchedAttributes>
            <string>cn</string>
            <string>objectClass</string>
            <string>gidNumber</string>
            <string>memberUid</string>
         </fetchedAttributes>

<!-- I only want to update the "group1" -->
         <getAllFilter>(cn=group1)</getAllFilter>
         <getOneFilter>(&amp;(cn=group1)(cn={memberUid}))</getOneFilter>
      </ldapDestinationService>

 <!-- ########################### -->

      <propertiesBasedSyncOptions>


<mainIdentifier>"cn=group1,ou=groupes,dc=MyDomain,dc=int"</mainIdentifier>
         <defaultDelimiter>;</defaultDelimiter>
         <defaultPolicy>KEEP</defaultPolicy>

         <conditions>
            <create>false</create>
            <update>true</update>
         </conditions>

        <dataset>
          <name>memberUid</name>
          <policy>FORCE</policy>
          <createValues>

<string>srcBean.getDatasetFirstValueById("cn").toLowerCase()</string>
          </createValues>
        </dataset>
       </propertiesBasedSyncOptions>
   </task>


Tell me if I'm wrong :
The "pivotAttributes" is a sort of a link between the source
and destination. In my example, I want the memberUid's destination to be
the source's cn ; So the memberUid is my pivotAttributes destination and
the cn my source ?
I don't see the real purpose of the "getOneFilter" beacause the
"getAllFilter" is already a filter ^^. But I think it's linked with the
pivotAttributes ? However it's a bit cloudy in my mind :D

Regards,


-- 
MILLION Emeric
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to