fix: LDAP sync interval (#304)

Configurable LDAP sync interval for each LDAP provider
This commit is contained in:
Dmytro Bondar
2024-09-22 11:49:23 +02:00
committed by GitHub
parent a46dabc1d3
commit 605841f2a0
4 changed files with 33 additions and 32 deletions

View File

@@ -1,6 +1,8 @@
package config
import (
"time"
"github.com/go-ldap/ldap/v3"
)
@@ -50,10 +52,10 @@ type LdapProvider struct {
AdminGroupDN string `yaml:"admin_group"` // Members of this group receive admin rights in WG-Portal
ParsedAdminGroupDN *ldap.DN `yaml:"-"`
Synchronize bool `yaml:"synchronize"`
// If DisableMissing is true, missing users will be deactivated
DisableMissing bool `yaml:"disable_missing"`
SyncFilter string `yaml:"sync_filter"`
DisableMissing bool `yaml:"disable_missing"`
SyncFilter string `yaml:"sync_filter"`
SyncInterval time.Duration `yaml:"sync_interval"`
// If RegistrationEnabled is set to true, wg-portal will create new users that do not exist in the database.
RegistrationEnabled bool `yaml:"registration_enabled"`

View File

@@ -27,7 +27,6 @@ type Config struct {
LogLevel string `yaml:"log_level"`
LogPretty bool `yaml:"log_pretty"`
LogJson bool `yaml:"log_json"`
LdapSyncInterval time.Duration `yaml:"ldap_sync_interval"`
StartListenPort int `yaml:"start_listen_port"`
StartCidrV4 string `yaml:"start_cidr_v4"`
StartCidrV6 string `yaml:"start_cidr_v6"`