提交 91e7692b 编写于 作者: J Jakub Jirutka

Fix searching by extern_uid for LDAP to be case-insensitive

上级 5e935bfe
......@@ -83,8 +83,13 @@ module Gitlab
private
def find_by_uid_and_provider
find_by_uid(uid)
end
def find_by_uid(uid)
model.where(provider: provider, extern_uid: uid).last
# LDAP distinguished name is case-insensitive
model.where("provider = ? and lower(extern_uid) = ?", provider, uid.downcase).last
end
def provider
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册