zitadel/pkg/grpc/app/application.go
Florian Forster fa9f581d56
chore(v2): move to new org (#3499)
* chore: move to new org

* logging

* fix: org rename caos -> zitadel

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
2022-04-26 23:01:45 +00:00

35 lines
687 B
Go

package app
import (
"github.com/zitadel/zitadel/internal/api/grpc/server/middleware"
)
func (a *App) Localizers() []middleware.Localizer {
if a == nil {
return nil
}
switch configType := a.Config.(type) {
case *App_OidcConfig:
return configType.ComplianceLocalizers()
}
return nil
}
func (o *App_OidcConfig) ComplianceLocalizers() []middleware.Localizer {
if o.OidcConfig == nil {
return nil
}
if !o.OidcConfig.NoneCompliant {
return nil
}
localizers := make([]middleware.Localizer, len(o.OidcConfig.ComplianceProblems))
for i, problem := range o.OidcConfig.ComplianceProblems {
localizers[i] = problem
}
return localizers
}
type AppConfig = isApp_Config