mirror of
https://github.com/zitadel/zitadel
synced 2024-11-22 00:39:36 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
35 lines
687 B
Go
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
|