EspoCRM 4.2.0 released

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • tarasm
    replied
    I will add this fix. Thanks

    Leave a comment:


  • Maho
    replied
    Ahh I figuered it out.
    There is an Option on the Zendadapter as I expected.
    Code:
     protected function findLdapUserDnByUsername($username)
        {
            $ldapClient = $this->getLdapClient();
            $options = $this->getUtils()->getOptions();
    
            $loginFilterString = '';
            if (!empty($options['userLoginFilter'])) {
                $loginFilterString = $this->convertToFilterFormat($options['userLoginFilter']);
            }
    
            $searchString = '(&(objectClass='.$options['userObjectClass'].')('.$options['userNameAttribute'].'='.$username.')'.$loginFilterString.')';
            $result = $ldapClient->search($searchString, null, LDAP\Client::[COLOR=#FF0000]SEARCH_SCOPE_SUB[/COLOR]);
            $GLOBALS['log']->debug('LDAP: user search string: "' . $searchString . '"');
    
            foreach ($result as $item) {
                return $item["dn"];
            }
        }
    This one is set to "SEARCH_SCOPE_ONE" by default.
    I suggest to make this available in the UI as well.

    Leave a comment:


  • Maho
    replied
    Yes I tried this option then the debugger tells me again "user not found"
    The Structure in my case lloks like this
    Click image for larger version

Name:	Unbenannt.PNG
Views:	373
Size:	5.0 KB
ID:	23285

    so all users shall have access. For me it looks like it is not resolving the hirachy.
    I tried to google for some information about the zend adapter. but since i am not a programmer I got stuck.
    I guess there is a parameter in the adapter to tell him serching through the hirachy

    Leave a comment:


  • tarasm
    replied
    Did you try "OU=Department,OU=Company,DC=xxxx,DC=xx xx"? Yes, this bug fixed and will be add to the new release.
    In my case, I have the following structure:
    Click image for larger version

Name:	ldap-users.png
Views:	0
Size:	14.4 KB
ID:	23283

    My base dn is "cn=users-group,ou=users,dc=espo,dc=local".

    Leave a comment:


  • Maho
    replied
    ok I played a little bit arround.
    so if I am typing the full "basedn" which in the case of my user "OU=OU-Mitarbeiter,OU=Department,OU=Company,DC=xxxx,DC=xx xx" it works fine.
    but if I want to give access to everybody in the company by using only "OU=Company,DC=xxxx,DC=xxxx" it says user not found.
    so is this a bug or is that how its suppose to be? because from my point of view the case of giving the company access should be valid?


    btw I found another small bug in the fieldmapping that should be fixed in the next update.
    Code:
    protected $ldapFieldMap = array(
            'userName' => 'userNameAttribute',
            'firstName' => 'userTitleAttribute',
            'lastName' => 'userFirstNameAttribute',
            'title' => 'userLastNameAttribute',
            'emailAddress' => 'userEmailAddressAttribute',
            'phoneNumber' => 'userPhoneNumberAttribute',
        );

    Leave a comment:


  • tarasm
    replied
    Did you define the user "Base DN" or "User Login Filter"? More information about configuring LDAP https://github.com/espocrm/documenta...thorization.md

    Leave a comment:


  • Maho
    replied
    Just updated to 4.2.2 and having the same issue with Ldap on AD.

    Code:
    [2016-08-16 09:26:17] Espo.DEBUG: LDAP: user search string: "(&(objectClass=user)(SamAccountName=me_user))" [] []
    [2016-08-16 09:26:17] Espo.DEBUG: Found DN for [me_user]: []. [] []
    [2016-08-16 09:26:17] Espo.ERROR: LDAP: Authentication failed for user [me_user], details: user is not found. [] []
    Connection test works fine.
    checkt several options with Userpricipalname and account canonical form.

    any ideas?

    Leave a comment:


  • tarasm
    replied
    The problem was in objectClass attribute, for LDAP it is "inetOrgPerson". Now, in 4.2.2 added possibility to define the objectClass attribute on LDAP setting page.

    Leave a comment:


  • markopraakli
    replied
    Originally posted by markopraakli
    [2016-08-12 12:26:43]Seems like it does not found DN
    Thaks confirmed. I wrote workaround DN bindings for each user, and returning correct dn for user, then it works. Can you try yourself to authenticate with OpenLDAP?

    Leave a comment:


  • markopraakli
    replied
    [2016-08-12 12:26:43] Espo.DEBUG: LDAP: user search string: "(&(objectClass=user)(uid=myuser))" [] []
    [2016-08-12 12:26:43] Espo.DEBUG: Found DN for [myuser]: []. [] []
    [2016-08-12 12:26:43] Espo.ERROR: LDAP: Authentication failed for user [myuser], details: user is not found. [] []

    Seems like it does not found DN but If i'll try to search manually with same filter and basedn then i found a user.

    Leave a comment:


  • tarasm
    replied
    Originally posted by markopraakli
    Also I found an problem with OpenLDAP after upgrading 4.1.6 to 4.2.0 LDAP authentication not work with OpenLDAP.
    What the problem is? Please check your log file. If no errors, please enable DEBUG mode.

    Leave a comment:


  • markopraakli
    replied
    Also I found an problem with OpenLDAP after upgrading 4.1.6 to 4.2.0 LDAP authentication not work with OpenLDAP.

    Leave a comment:


  • yuri
    replied
    Hi,

    It's possible but not so easy. You can remove your entity and create new one. Create fields, relations with keeping their names and types.

    Leave a comment:


  • markopraakli
    replied
    Hi

    How is possible to change current Base entity to Event entity. This is needed because I would like to show existing entity entries in calendar or is there some migration tool which can convert entity data?

    Leave a comment:


  • islam.ahmed.2212
    replied
    thnx problem resolved after upgrade

    Leave a comment:

Working...