summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-06-17 12:07:35 -0400
committerJoramWilander <jwawilander@gmail.com>2015-06-17 12:07:35 -0400
commit799215ee2278b162d4e113c498424fdda817e83b (patch)
treecff7f204fe24e9bcac2058823160031a575cdd80 /store
parent5a8f8397167cec8cba29b70bb7dbdda9ba0265f7 (diff)
downloadchat-799215ee2278b162d4e113c498424fdda817e83b.tar.gz
chat-799215ee2278b162d4e113c498424fdda817e83b.tar.bz2
chat-799215ee2278b162d4e113c498424fdda817e83b.zip
move valet feature switch to DB from config
Diffstat (limited to 'store')
-rw-r--r--store/sql_team_store.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/store/sql_team_store.go b/store/sql_team_store.go
index 6e7fc1c1e..ffb9f8093 100644
--- a/store/sql_team_store.go
+++ b/store/sql_team_store.go
@@ -5,6 +5,7 @@ package store
import (
"github.com/mattermost/platform/model"
+ "github.com/mattermost/platform/utils"
"strings"
)
@@ -29,6 +30,11 @@ func NewSqlTeamStore(sqlStore *SqlStore) TeamStore {
}
func (s SqlTeamStore) UpgradeSchemaIfNeeded() {
+ defaultValue := "0"
+ if utils.Cfg.TeamSettings.AllowValetDefault {
+ defaultValue = "1"
+ }
+ s.CreateColumnIfNotExists("Teams", "AllowValet", "AllowedDomains", "tinyint(1)", defaultValue)
}
func (s SqlTeamStore) CreateIndexesIfNotExists() {