[MM-59359] imports/import_validators.go: add openid to auth_service validation (#28082)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2024-09-17 07:13:54 +02:00
коммит произвёл GitHub
родитель f18323980f
Коммит 075681a412
2 изменённых файлов: 2 добавлений и 0 удалений

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

@@ -320,6 +320,7 @@ var validAuthServices = []string{
model.UserAuthServiceLdap,
model.ServiceGoogle,
model.ServiceOffice365,
model.ServiceOpenid,
}
func validateAuthService(authService *string) *model.AppError {

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

@@ -646,6 +646,7 @@ func TestImportValidateUserAuth(t *testing.T) {
{model.NewPointer("foo"), model.NewPointer("foo"), false},
{nil, model.NewPointer(""), true},
{model.NewPointer(""), nil, true},
{model.NewPointer(model.ServiceOpenid), model.NewPointer("foo@bar.baz"), true},
{model.NewPointer("foo"), nil, false},
{model.NewPointer("foo"), model.NewPointer(""), false},