summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-04-06 08:19:56 -0400
committerChristopher Speller <crspeller@gmail.com>2016-04-06 08:19:56 -0400
commit1954c449931344baca04b126c86b00f95677a570 (patch)
treeec6922905b9de83632752faa2e6fec6f6f111c74 /model
parent683e79eeab52e02dedea15d3416c504bc52cb4c5 (diff)
downloadchat-1954c449931344baca04b126c86b00f95677a570.tar.gz
chat-1954c449931344baca04b126c86b00f95677a570.tar.bz2
chat-1954c449931344baca04b126c86b00f95677a570.zip
Adding LDAP user filtering capability
Diffstat (limited to 'model')
-rw-r--r--model/config.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index e7ab07f8c..666b2770b 100644
--- a/model/config.go
+++ b/model/config.go
@@ -169,6 +169,9 @@ type LdapSettings struct {
BindUsername *string
BindPassword *string
+ // Filtering
+ UserFilter *string
+
// User Mapping
FirstNameAttribute *string
LastNameAttribute *string
@@ -366,6 +369,11 @@ func (o *Config) SetDefaults() {
*o.LdapSettings.Enable = false
}
+ if o.LdapSettings.UserFilter == nil {
+ o.LdapSettings.UserFilter = new(string)
+ *o.LdapSettings.UserFilter = ""
+ }
+
if o.ServiceSettings.SessionLengthWebInDays == nil {
o.ServiceSettings.SessionLengthWebInDays = new(int)
*o.ServiceSettings.SessionLengthWebInDays = 30