Skip to content

Allow searching users with sub tenants#599

Merged
aviadl merged 2 commits intomainfrom
sub-tenants-sdk
Aug 28, 2025
Merged

Allow searching users with sub tenants#599
aviadl merged 2 commits intomainfrom
sub-tenants-sdk

Conversation

@aviadl
Copy link
Member

@aviadl aviadl commented Aug 27, 2025

allow creating tenants with parent ids
related to https://github.com/descope/etc/issues/9374

  • tests

allow creating tenants with parent ids
related to descope/etc#9374
+ tests
@aviadl aviadl requested review from Copilot and dorsha August 27, 2025 13:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for hierarchical tenants by allowing the creation of sub-tenants with parent relationships. It also enhances user search functionality to optionally include users from sub-tenants.

  • Added ParentID field to TenantRequest for creating sub-tenants
  • Added IncludeSubTenants flag to UserSearchOptions for hierarchical user searches
  • Updated tenant creation logic to handle parent-child relationships

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
descope/types.go Added ParentID field to TenantRequest and IncludeSubTenants flag to UserSearchOptions
descope/internal/mgmt/user.go Updated user search request to include the IncludeSubTenants parameter
descope/internal/mgmt/tenant.go Modified tenant creation/update logic to handle parent ID when creating sub-tenants
descope/internal/mgmt/tenant_test.go Updated test to verify parent ID is properly included in tenant creation requests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@aviadl aviadl enabled auto-merge (squash) August 27, 2025 14:58
@aviadl aviadl requested a review from dorsha August 28, 2025 07:07
@aviadl aviadl merged commit 4b2ed3c into main Aug 28, 2025
7 checks passed
@aviadl aviadl deleted the sub-tenants-sdk branch August 28, 2025 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants