Adding new fields to team model
Этот коммит содержится в:
@@ -27,6 +27,9 @@ type Team struct {
|
|||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
CompanyName string `json:"company_name"`
|
CompanyName string `json:"company_name"`
|
||||||
AllowedDomains string `json:"allowed_domains"`
|
AllowedDomains string `json:"allowed_domains"`
|
||||||
|
InviteId string `json:"invite_id"`
|
||||||
|
AllowOpenInvite bool `json:"allow_open_invite"`
|
||||||
|
AllowTeamListing bool `json:"allow_team_listing"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Invites struct {
|
type Invites struct {
|
||||||
@@ -147,6 +150,10 @@ func (o *Team) IsValid(restrictTeamNames bool) *AppError {
|
|||||||
return NewAppError("Team.IsValid", "Invalid allowed domains", "id="+o.Id)
|
return NewAppError("Team.IsValid", "Invalid allowed domains", "id="+o.Id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(o.InviteId) > 0 && len(o.InviteId) != 26 {
|
||||||
|
return NewAppError("Team.IsValid", "Invalid inviate Id", "")
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user