* role refactor

* add missing file

* fix web test
Этот коммит содержится в:
Chris
2017-11-21 13:08:32 -06:00
коммит произвёл Christopher Speller
родитель 01e652ed48
Коммит 816a30397d
38 изменённых файлов: 466 добавлений и 499 удалений

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

@@ -11,7 +11,6 @@ import (
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/utils"
)
func TestCreateWebhookPost(t *testing.T) {
@@ -19,12 +18,8 @@ func TestCreateWebhookPost(t *testing.T) {
defer th.TearDown()
enableIncomingHooks := th.App.Config().ServiceSettings.EnableIncomingWebhooks
defer func() {
th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableIncomingWebhooks = enableIncomingHooks })
utils.SetDefaultRolesBasedOnConfig()
}()
defer th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableIncomingWebhooks = enableIncomingHooks })
th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableIncomingWebhooks = true })
utils.SetDefaultRolesBasedOnConfig()
hook, err := th.App.CreateIncomingWebhookForChannel(th.BasicUser.Id, th.BasicChannel, &model.IncomingWebhook{ChannelId: th.BasicChannel.Id})
if err != nil {