ldap - compare DNs using DN.Equal (#60)

* ldap - compare DNs using DN.Equal

* ldap/isAdmin- restructure & remove code duplication

Co-authored-by: Markus Koetter <koetter@cispa.de>
This commit is contained in:
commonism
2021-10-14 08:57:03 +02:00
committed by GitHub
parent 04bc0b7a81
commit d7b52eba1c
3 changed files with 29 additions and 16 deletions

View File

@@ -1,5 +1,10 @@
package ldap
import (
gldap "github.com/go-ldap/ldap/v3"
)
type Type string
const (
@@ -24,4 +29,5 @@ type Config struct {
LoginFilter string `yaml:"loginFilter" envconfig:"LDAP_LOGIN_FILTER"` // {{login_identifier}} gets replaced with the login email address
SyncFilter string `yaml:"syncFilter" envconfig:"LDAP_SYNC_FILTER"`
AdminLdapGroup string `yaml:"adminGroup" envconfig:"LDAP_ADMIN_GROUP"` // Members of this group receive admin rights in WG-Portal
AdminLdapGroup_ *gldap.DN `yaml:"-"`
}