diff options
author | Corey Hulen <corey@hulen.com> | 2015-07-21 10:47:46 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-07-21 10:47:46 -0800 |
commit | bee26e3f2654ce7acce647818847480569236343 (patch) | |
tree | ad9032009e18b78c3ffca6e9e48fc4467ddd282b /model/utils.go | |
parent | dc250d77310e8b38b445bcaa4ae8f2d5df97cc1e (diff) | |
parent | c6fb95912bb481791c1ca370a46a4da9c05d05ad (diff) | |
download | chat-bee26e3f2654ce7acce647818847480569236343.tar.gz chat-bee26e3f2654ce7acce647818847480569236343.tar.bz2 chat-bee26e3f2654ce7acce647818847480569236343.zip |
Merge pull request #200 from mattermost/mm-1356
MM-1356 Changing team URLs from team.domain.com to domain.com/team
Diffstat (limited to 'model/utils.go')
-rw-r--r-- | model/utils.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/model/utils.go b/model/utils.go index 465901a09..38592b984 100644 --- a/model/utils.go +++ b/model/utils.go @@ -148,7 +148,7 @@ func IsValidEmail(email string) bool { return false } -var reservedDomains = []string{ +var reservedName = []string{ "www", "web", "admin", @@ -168,10 +168,10 @@ var reservedDomains = []string{ "api", } -func IsReservedDomain(s string) bool { +func IsReservedTeamName(s string) bool { s = strings.ToLower(s) - for _, value := range reservedDomains { + for _, value := range reservedName { if strings.Index(s, value) == 0 { return true } @@ -180,7 +180,7 @@ func IsReservedDomain(s string) bool { return false } -func IsValidDomain(s string) bool { +func IsValidTeamName(s string) bool { if !IsValidAlphaNum(s) { return false |