diff options
author | =Corey Hulen <corey@hulen.com> | 2015-10-20 17:30:24 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-10-20 17:30:24 -0700 |
commit | b9ce4a644d8e97ed05acb79033ea2f5043494ee4 (patch) | |
tree | 18856536744f9eb93a779997a006973c0ae6c2b7 /model/team.go | |
parent | 7ea8268ae88ecd3b94c0bf9bafbc169c50df4595 (diff) | |
download | chat-b9ce4a644d8e97ed05acb79033ea2f5043494ee4.tar.gz chat-b9ce4a644d8e97ed05acb79033ea2f5043494ee4.tar.bz2 chat-b9ce4a644d8e97ed05acb79033ea2f5043494ee4.zip |
PLT-350 allow ability to disable restricted team names
Diffstat (limited to 'model/team.go')
-rw-r--r-- | model/team.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/model/team.go b/model/team.go index 584c78f8d..9da2cd5b2 100644 --- a/model/team.go +++ b/model/team.go @@ -97,7 +97,7 @@ func (o *Team) Etag() string { return Etag(o.Id, o.UpdateAt) } -func (o *Team) IsValid() *AppError { +func (o *Team) IsValid(restrictTeamNames bool) *AppError { if len(o.Id) != 26 { return NewAppError("Team.IsValid", "Invalid Id", "") @@ -127,7 +127,7 @@ func (o *Team) IsValid() *AppError { return NewAppError("Team.IsValid", "Invalid URL Identifier", "id="+o.Id) } - if IsReservedTeamName(o.Name) { + if restrictTeamNames && IsReservedTeamName(o.Name) { return NewAppError("Team.IsValid", "This URL is unavailable. Please try another.", "id="+o.Id) } |