1
0
forked from baron/baron-sso

fix: align UserGroup ReBAC syncing with Tenant namespace design

This commit is contained in:
2026-03-04 15:01:53 +09:00
parent 6506bd192d
commit e97c5418b9
2 changed files with 9 additions and 9 deletions

View File

@@ -130,9 +130,9 @@ func (s *orgChartService) ImportCSV(ctx context.Context, tenantID string, r io.R
// 3. Sync Membership to Keto via Outbox
if s.ketoOutboxRepo != nil {
// Add as member of UserGroup
// Add as member of UserGroup (which is a Tenant namespace object)
_ = s.ketoOutboxRepo.Create(ctx, &domain.KetoOutbox{
Namespace: "UserGroup",
Namespace: "Tenant",
Object: leafID,
Relation: "members",
Subject: "User:" + kratosID,
@@ -142,7 +142,7 @@ func (s *orgChartService) ImportCSV(ctx context.Context, tenantID string, r io.R
// Add as owner if applicable
if isOwner {
_ = s.ketoOutboxRepo.Create(ctx, &domain.KetoOutbox{
Namespace: "UserGroup",
Namespace: "Tenant",
Object: leafID,
Relation: "owners",
Subject: "User:" + kratosID,