• Oleg Girko's avatar
    Set username field of users created from LDAP to uid attribute. · b215350e
    Oleg Girko authored
    The previous approach of making username from user part of
    email address (part of address before '@') has the following limitations:
    * username in email is not guaranteed to be unique,
    * email could have nothing to do with user identity in LDAP
      (like presonal email on an external email service).
    On the other hand, LDAP uid is guaranteed to be unique,
    as it represents user's login name on Unix/Linux systems.
    
    To understand this change, please note that gitlab_omniauth-ldap
    Ruby gem uses the following mapping to store LDAP attrinbutes in auth info:
    * dn attribute of LDAP entry is stored in uid attribute of auth info;
    * uid attribute of LDAP entry is stored in nickname attribute of auth info.
    Signed-off-by: default avatarOleg Girko <oleg.girko@jolla.com>
    b215350e
user.rb 2.26 KB