feat(organization): transition membership model to tenant-level and enhance invite functionality
Updated the organization membership model to operate at the tenant level, aligning with Plan 3. This change introduces new interfaces and modifies existing ones to accommodate tenant-centric operations, including the `InviteMemberRequest` and `TenantInviteCandidate`. The search functionality for inviting members has been updated to reflect this shift, allowing for tenant-based searches instead of user-based. Additionally, internationalization files have been updated to ensure consistent messaging across languages regarding tenant membership and roles. Refs: #1303
This commit is contained in:
@@ -854,7 +854,14 @@ func RegisterOrganizationRoutes(r *gin.RouterGroup, orgHandler *handler.Organiza
|
||||
// invite code is an admin action; the service layer additionally
|
||||
// requires the caller's tenant to be admin in the org.
|
||||
orgs.POST("/:id/invite-code", g.Admin(), orgHandler.GenerateInviteCode)
|
||||
// Search users for invite (admin only)
|
||||
// Search tenants for invite (admin only). Plan 3 changed the
|
||||
// unit of membership to "tenant"; this endpoint returns
|
||||
// candidate tenants (with one representative user attached)
|
||||
// instead of one row per user.
|
||||
orgs.GET("/:id/search-tenants", g.Admin(), orgHandler.SearchTenantsForInvite)
|
||||
// Deprecated alias for /:id/search-tenants. Old frontends that
|
||||
// still hit search-users will receive the tenant-grouped shape;
|
||||
// the deprecation is documented in the handler.
|
||||
orgs.GET("/:id/search-users", g.Admin(), orgHandler.SearchUsersForInvite)
|
||||
// Invite member directly (admin only)
|
||||
orgs.POST("/:id/invite", g.Admin(), orgHandler.InviteMember)
|
||||
|
||||
Reference in New Issue
Block a user