forked from baron/baron-sso
fix: resolve build errors and fix member count synchronization issues in bulk/org-chart import
This commit is contained in:
@@ -139,6 +139,17 @@ func (s *orgChartService) ImportCSV(ctx context.Context, tenantID string, r io.R
|
||||
Action: domain.KetoOutboxActionCreate,
|
||||
})
|
||||
|
||||
// [New] Also add as member of the root Tenant (for tenant-level member count)
|
||||
if leafID != tenantID {
|
||||
_ = s.ketoOutboxRepo.Create(ctx, &domain.KetoOutbox{
|
||||
Namespace: "Tenant",
|
||||
Object: tenantID,
|
||||
Relation: "members",
|
||||
Subject: "User:" + kratosID,
|
||||
Action: domain.KetoOutboxActionCreate,
|
||||
})
|
||||
}
|
||||
|
||||
// Add as owner if applicable
|
||||
if isOwner {
|
||||
_ = s.ketoOutboxRepo.Create(ctx, &domain.KetoOutbox{
|
||||
|
||||
Reference in New Issue
Block a user