From fe4a115c9dbf5771b3c1e13355dbf754096a90b9 Mon Sep 17 00:00:00 2001 From: Tao Chen <42793494+IamTaoChen@users.noreply.github.com> Date: Wed, 21 May 2025 09:07:08 +0800 Subject: [PATCH] fix: dn should be case-insensitive (#250) --- service/ldap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/ldap.go b/service/ldap.go index 5d6609f..f9c54f6 100644 --- a/service/ldap.go +++ b/service/ldap.go @@ -411,7 +411,7 @@ func (ls *LdapService) isUserAdmin(cfg *config.Ldap, ldapUser *LdapUser) bool { // Check "memberOf" directly if len(ldapUser.MemberOf) > 0 { for _, group := range ldapUser.MemberOf { - if group == adminGroup { + if strings.EqualFold(group, adminGroup) { return true } }