From b9ce4a644d8e97ed05acb79033ea2f5043494ee4 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 20 Oct 2015 17:30:24 -0700 Subject: PLT-350 allow ability to disable restricted team names --- model/team.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'model/team.go') 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) } -- cgit v1.2.3-1-g7c22