From 4392810ec792e848289bdb960fbbf750d69130bc Mon Sep 17 00:00:00 2001 From: chan Date: Wed, 4 Mar 2026 15:21:31 +0900 Subject: [PATCH] fix: revert tab name and improve group list error handling --- adminfront/src/locales/en.toml | 2 +- adminfront/src/locales/ko.toml | 2 +- backend/internal/service/user_group_service.go | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/adminfront/src/locales/en.toml b/adminfront/src/locales/en.toml index 4cc8af84..c75fe3b2 100644 --- a/adminfront/src/locales/en.toml +++ b/adminfront/src/locales/en.toml @@ -807,7 +807,7 @@ header_subtitle = "Update tenant information or manage integration settings." loading = "Loading tenant information..." tab_admins = "Admin Settings" tab_federation = "External Integration" -tab_organization = "Organization" +tab_organization = "Sub-tenant Management" tab_profile = "Profile" tab_schema = "User Schema" title = "Tenant Details" diff --git a/adminfront/src/locales/ko.toml b/adminfront/src/locales/ko.toml index 2cb20d13..e44c8720 100644 --- a/adminfront/src/locales/ko.toml +++ b/adminfront/src/locales/ko.toml @@ -811,7 +811,7 @@ header_subtitle = "테넌트 정보를 수정하거나 연동 설정을 관리 loading = "테넌트 정보를 불러오는 중..." tab_admins = "관리자 설정" tab_federation = "외부 연동" -tab_organization = "조직 관리" +tab_organization = "하위 테넌트 관리" tab_profile = "프로필" tab_schema = "사용자 스키마" title = "테넌트 상세" diff --git a/backend/internal/service/user_group_service.go b/backend/internal/service/user_group_service.go index 1553eeed..dbccc401 100644 --- a/backend/internal/service/user_group_service.go +++ b/backend/internal/service/user_group_service.go @@ -192,12 +192,19 @@ func (s *userGroupService) List(ctx context.Context, tenantID string) ([]domain. return nil, err } + if s.ketoService == nil { + return groups, nil + } + // For each group, fetch member count from Keto for i := range groups { tuples, err := s.ketoService.ListRelations(ctx, "Tenant", groups[i].ID, "members", "") if err == nil { // Create dummy members just to carry the count for the JSON response groups[i].Members = make([]domain.User, len(tuples)) + } else { + slog.Warn("Failed to fetch member count from Keto", "groupID", groups[i].ID, "error", err) + groups[i].Members = []domain.User{} } }