fix: add organizationID query for user v2 ListUsers and clean up depeprecated attribute (#7593)

Add organizationID as query for ListUsers and clean up the deprecated Organisation attributes in other queries.

This PR removes the following fields from API requests (user service v2):

organisation from AddHumanUser (deprecated some time ago, organization still exists)
organization from GetUserByID
This commit is contained in:
Stefan Benz
2024-03-21 09:07:00 +01:00
committed by GitHub
parent 7e24a1adbc
commit 319ebe7898
8 changed files with 217 additions and 143 deletions

View File

@@ -1,13 +1,3 @@
package user
type SearchQuery_ResourceOwner struct {
ResourceOwner *ResourceOwnerQuery
}
func (SearchQuery_ResourceOwner) isSearchQuery_Query() {}
type ResourceOwnerQuery struct {
OrgID string
}
type UserType = isUser_Type

View File

@@ -1,12 +0,0 @@
package user
import "github.com/zitadel/zitadel/internal/api/grpc/server/middleware"
// OrganisationFromRequest implements deprecated [middleware.OrganisationFromRequest] interface.
// it will be removed before going GA (https://github.com/zitadel/zitadel/issues/6718)
func (r *AddHumanUserRequest) OrganisationFromRequest() *middleware.Organization {
return &middleware.Organization{
ID: r.GetOrganisation().GetOrgId(),
Domain: r.GetOrganisation().GetOrgDomain(),
}
}