mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-09 23:55:12 +00:00
chore: forward port organization v2 API changes (#11207)
# Which Problems Are Solved Recent changes to the v2beta and v2 API of the organization service were directly merged to the `next` branch and release on v4.x, since the ongoing move to the relation table, blocked it from being merged into main. # How the Problems Are Solved This PR ports the following changes into main: - fix(api): correct permission check in organization v2beta service: https://github.com/zitadel/zitadel/commit/8dcfff97ed52a8b9fc77ecb1f972744f42cff3ed - fix(actions v1): return org metadata again (https://github.com/zitadel/zitadel/pull/11040) - feat(api): move organization api (https://github.com/zitadel/zitadel/pull/11045) # Additional Changes None # Additional Context relates to #10772 --------- Co-authored-by: Gayathri Vijayan <[email protected]>
This commit is contained in:
co-authored by
Gayathri Vijayan
parent
4c8a668585
commit
5f34d1af8f
@@ -131,6 +131,7 @@ func (l *Login) runPostExternalAuthenticationActions(
|
||||
resourceOwner,
|
||||
&query.OrgMetadataSearchQueries{},
|
||||
false,
|
||||
false,
|
||||
)
|
||||
if err != nil {
|
||||
logging.WithError(err).Info("unable to get org metadata in action")
|
||||
@@ -326,6 +327,7 @@ func (l *Login) runPreCreationActions(
|
||||
resourceOwner,
|
||||
&query.OrgMetadataSearchQueries{},
|
||||
false,
|
||||
false,
|
||||
)
|
||||
if err != nil {
|
||||
logging.WithError(err).Info("unable to get org metadata in action")
|
||||
@@ -402,6 +404,7 @@ func (l *Login) runPostCreationActions(
|
||||
resourceOwner,
|
||||
&query.OrgMetadataSearchQueries{},
|
||||
false,
|
||||
false,
|
||||
)
|
||||
if err != nil {
|
||||
logging.WithError(err).Info("unable to get org metadata in action")
|
||||
|
||||
@@ -105,7 +105,7 @@ func (l *Login) passLoginHintToRegistration(r *http.Request, authReq *domain.Aut
|
||||
logging.WithFields("authRequest", authReq.ID, "org", authReq.RequestedOrgID).Error("unable to search query for registration loginHint")
|
||||
return data
|
||||
}
|
||||
domains, err := l.query.SearchOrgDomains(r.Context(), &query.OrgDomainSearchQueries{Queries: []query.SearchQuery{searchQuery}}, false)
|
||||
domains, err := l.query.SearchOrgDomains(r.Context(), &query.OrgDomainSearchQueries{Queries: []query.SearchQuery{searchQuery}}, false, false)
|
||||
if err != nil {
|
||||
logging.WithFields("authRequest", authReq.ID, "org", authReq.RequestedOrgID).Error("unable to load domains for registration loginHint")
|
||||
return data
|
||||
|
||||
@@ -84,7 +84,7 @@ func (l *Login) handleRegisterOrgCheck(w http.ResponseWriter, r *http.Request) {
|
||||
l.renderRegisterOrg(w, r, authRequest, data, err)
|
||||
return
|
||||
}
|
||||
_, err = l.command.SetUpOrg(ctx, data.toCommandOrg(), true, userIDs...)
|
||||
_, err = l.command.SetUpOrg(ctx, data.toCommandOrg(), true, nil, userIDs...)
|
||||
if err != nil {
|
||||
l.renderRegisterOrg(w, r, authRequest, data, err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user