Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Josh Soref
2022-02-28 04:31:00 -05:00
коммит произвёл GitHub
родитель a22bc8fd96
Коммит 5d85417a8b
42 изменённых файлов: 101 добавлений и 101 удалений

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

@@ -827,10 +827,10 @@ func TestCreateUserWithToken(t *testing.T) {
})
t.Run("create guest having email domain restrictions", func(t *testing.T) {
enableGuestDomainRestricions := *th.App.Config().GuestAccountsSettings.RestrictCreationToDomains
enableGuestDomainRestrictions := *th.App.Config().GuestAccountsSettings.RestrictCreationToDomains
defer func() {
th.App.UpdateConfig(func(cfg *model.Config) {
cfg.GuestAccountsSettings.RestrictCreationToDomains = &enableGuestDomainRestricions
cfg.GuestAccountsSettings.RestrictCreationToDomains = &enableGuestDomainRestrictions
})
}()
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.GuestAccountsSettings.RestrictCreationToDomains = "restricted.com" })
@@ -876,10 +876,10 @@ func TestCreateUserWithToken(t *testing.T) {
th.BasicTeam.AllowedDomains = "restricted-team.com"
_, err := th.App.UpdateTeam(th.BasicTeam)
require.Nil(t, err, "Should update the team")
enableGuestDomainRestricions := *th.App.Config().TeamSettings.RestrictCreationToDomains
enableGuestDomainRestrictions := *th.App.Config().TeamSettings.RestrictCreationToDomains
defer func() {
th.App.UpdateConfig(func(cfg *model.Config) {
cfg.TeamSettings.RestrictCreationToDomains = &enableGuestDomainRestricions
cfg.TeamSettings.RestrictCreationToDomains = &enableGuestDomainRestrictions
})
}()
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.RestrictCreationToDomains = "restricted.com" })