Remove LDAP::User#blocked? method because it duplciate
existing functionality of LDAP::Access#allowed? method
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
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: Oleg Girko <oleg.girko@jolla.com>
Now you are able to specify LDAP user filter string in gitlab.yml.
So its possible to exclude some users from accessing gitlab.
If user with LDAP account not matching this filter will try to login or
use gitlab he will get error message like 'Access denied for your LDAP
account' and will be signed out.
-when logging in if users are allowed to login with just usernames in ldap we will update uid of the user if their uid is out of date
Conflicts:
spec/lib/auth_spec.rb
Change-Id: Ia171b3d5133da86edc18c0d08ecfaf6a174f2574