mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:47:32 +00:00
fix: load auth users (#3907)
* fix: load auth users * fix: add triggerbulk * fix: build pre-release * fix even more french translations * fix: build version Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ package middleware
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/zitadel/logging"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/api/authz"
|
||||
@@ -13,7 +14,11 @@ import (
|
||||
func TranslationHandler() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
resp, err := handler(ctx, req)
|
||||
translator := newZitadelTranslator(authz.GetInstance(ctx).DefaultLanguage())
|
||||
translator, translatorError := newZitadelTranslator(authz.GetInstance(ctx).DefaultLanguage())
|
||||
if translatorError != nil {
|
||||
logging.New().WithError(translatorError).Error("could not load translator")
|
||||
return resp, err
|
||||
}
|
||||
if loc, ok := resp.(localizers); ok && resp != nil {
|
||||
translateFields(ctx, loc, translator)
|
||||
}
|
||||
|
Reference in New Issue
Block a user