MM-11106: Allow systeadmin webook to post to read only town square. (#9051)

Этот коммит содержится в:
George Goldberg
2018-07-06 09:07:36 +01:00
коммит произвёл Carlos Tadeu Panato Junior
родитель 8d3ea1bbf6
Коммит 0896b5c64e
3 изменённых файлов: 43 добавлений и 12 удалений

Просмотреть файл

@@ -37,10 +37,13 @@ func StopTestStore() {
}
type TestHelper struct {
App *app.App
BasicUser *model.User
BasicChannel *model.Channel
BasicTeam *model.Team
App *app.App
BasicUser *model.User
BasicChannel *model.Channel
BasicTeam *model.Team
SystemAdminUser *model.User
}
func Setup() *TestHelper {
@@ -77,7 +80,9 @@ func Setup() *TestHelper {
}
func (th *TestHelper) InitBasic() *TestHelper {
user, _ := th.App.CreateUser(&model.User{Email: model.NewId() + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", Password: "passwd1", EmailVerified: true, Roles: model.SYSTEM_ADMIN_ROLE_ID})
th.SystemAdminUser, _ = th.App.CreateUser(&model.User{Email: model.NewId() + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", Password: "passwd1", EmailVerified: true, Roles: model.SYSTEM_ADMIN_ROLE_ID})
user, _ := th.App.CreateUser(&model.User{Email: model.NewId() + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", Password: "passwd1", EmailVerified: true, Roles: model.SYSTEM_USER_ROLE_ID})
team, _ := th.App.CreateTeam(&model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: user.Email, Type: model.TEAM_OPEN})