summaryrefslogtreecommitdiffstats
path: root/model/team.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/team.go')
-rw-r--r--model/team.go4
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)
}