forked from baron/baron-sso
fix: align UserGroup ReBAC syncing with Tenant namespace design
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user