keep original admin group behaviour

This commit is contained in:
Christoph Haas
2023-01-06 00:03:37 +01:00
parent 1c97ff8d27
commit 3c2c7f325b
3 changed files with 63 additions and 60 deletions

View File

@@ -97,6 +97,9 @@ func FindAllObjects(cfg *Config, objType ObjectType) ([]RawLdapData, error) {
cfg.SyncFilter, attrs, nil,
)
case Groups:
if cfg.SyncGroupFilter == "" {
return nil, nil // no groups
}
// Search all groups
attrs = []string{"dn", cfg.GroupMemberAttribute}
searchRequest = ldap.NewSearchRequest(