fix: dn should be case-insensitive (#250)

This commit is contained in:
Tao Chen
2025-05-21 09:07:08 +08:00
committed by GitHub
parent 4412f0309c
commit fe4a115c9d

View File

@@ -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
}
}