forked from baron/baron-sso
fix: revert tab name and improve group list error handling
This commit is contained in:
@@ -807,7 +807,7 @@ header_subtitle = "Update tenant information or manage integration settings."
|
|||||||
loading = "Loading tenant information..."
|
loading = "Loading tenant information..."
|
||||||
tab_admins = "Admin Settings"
|
tab_admins = "Admin Settings"
|
||||||
tab_federation = "External Integration"
|
tab_federation = "External Integration"
|
||||||
tab_organization = "Organization"
|
tab_organization = "Sub-tenant Management"
|
||||||
tab_profile = "Profile"
|
tab_profile = "Profile"
|
||||||
tab_schema = "User Schema"
|
tab_schema = "User Schema"
|
||||||
title = "Tenant Details"
|
title = "Tenant Details"
|
||||||
|
|||||||
@@ -811,7 +811,7 @@ header_subtitle = "테넌트 정보를 수정하거나 연동 설정을 관리
|
|||||||
loading = "테넌트 정보를 불러오는 중..."
|
loading = "테넌트 정보를 불러오는 중..."
|
||||||
tab_admins = "관리자 설정"
|
tab_admins = "관리자 설정"
|
||||||
tab_federation = "외부 연동"
|
tab_federation = "외부 연동"
|
||||||
tab_organization = "조직 관리"
|
tab_organization = "하위 테넌트 관리"
|
||||||
tab_profile = "프로필"
|
tab_profile = "프로필"
|
||||||
tab_schema = "사용자 스키마"
|
tab_schema = "사용자 스키마"
|
||||||
title = "테넌트 상세"
|
title = "테넌트 상세"
|
||||||
|
|||||||
@@ -192,12 +192,19 @@ func (s *userGroupService) List(ctx context.Context, tenantID string) ([]domain.
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.ketoService == nil {
|
||||||
|
return groups, nil
|
||||||
|
}
|
||||||
|
|
||||||
// For each group, fetch member count from Keto
|
// For each group, fetch member count from Keto
|
||||||
for i := range groups {
|
for i := range groups {
|
||||||
tuples, err := s.ketoService.ListRelations(ctx, "Tenant", groups[i].ID, "members", "")
|
tuples, err := s.ketoService.ListRelations(ctx, "Tenant", groups[i].ID, "members", "")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// Create dummy members just to carry the count for the JSON response
|
// Create dummy members just to carry the count for the JSON response
|
||||||
groups[i].Members = make([]domain.User, len(tuples))
|
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{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user