Menu

how verify a duplicate uid to before the entry is created

Help
Anonymous
2014-11-25
2015-02-17
  • Anonymous

    Anonymous - 2014-11-25

    I want validate if a uid is duplicated before the entry is created. for this i make a template.

    <template>
      <name>uid_user</name>
      <description>uid user. 
      <author>JJF</author>
      <version>1.0</version>
      <email>jose.fernandez@open-world.com.ve</email>
    
      <extends>user</extends>
    
      <attribute>
        <name>objectclass</name>
        <value>inetOrgPerson</value> 
        <value>shadowAccount</value>
      </attribute>
    
    <control type="panel">
        <caption>Informacion del empleado</caption>
        <bevel>lowered</bevel>
     <attribute type="text">
         <name>employeeNumber</name>
         <description>Numero de Empleado</description>
     </attribute>
    
     <attribute type="text">
         <name>employeeType</name>
         <description>Cargo</description>
     </attribute>             
    </control>
    
    <script>
    entry.OnWrite = entryOnWrite;
    
    function entryOnWrite(Sender) {
      attributesByName['gecos'].value = attributesByName['uid'].value
      busca='uid='+ attributesByName['uid'].value;
      sr = session.search(busca, 'dc=bolipuertos,dc=gob,dc=ve', 2, 'uid', false );
      if (sr.count > 0 )
       {
        alert("Login repetido. Cambiar por favor");
       }
    }
    </script>
    </template>
    

    The template tell me if one uid if duplicated, but allways created the entry.
    How do I can do to make the function if the uid is repeated display the alert and return to the form for the user to change the uid ?
    in html i can return false to the function submit.

    and the other thing if that i create the entry then return me this message
    "Zugriffsverletzung bei Adresse 00417CE2 in modul 'LdapAdmin.exe'. Lesen Von Adresse 00000017."

    how can i correct that message?

    thanks for the help!!!

     
  • Tihomir Karlovic

    Give me a few days to see into it...

     
  • Tihomir Karlovic

    Sorry, I have to admit that I forgot about this issue. I apologize! Could you find a solution or is this still a problem?

    Cheers,
    Tihomir

     

Anonymous
Anonymous

Add attachments
Cancel