mirror of
https://github.com/zitadel/zitadel.git
synced 2025-05-02 13:10:50 +00:00
fix: handle private labeling on login page without auth request (#2309)
* fix: handle private labeling on login page without auth request * fix: respect requested org (primary domain scope) for private labeling again
This commit is contained in:
parent
ec6e1ed467
commit
b5a6e25e9d
@ -521,6 +521,9 @@ func (repo *AuthRequestRepo) fillPolicies(ctx context.Context, request *domain.A
|
|||||||
privateLabelingOrgID = request.UserOrgID
|
privateLabelingOrgID = request.UserOrgID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if request.RequestedOrgID != "" {
|
||||||
|
privateLabelingOrgID = request.RequestedOrgID
|
||||||
|
}
|
||||||
labelPolicy, err := repo.getLabelPolicy(ctx, privateLabelingOrgID)
|
labelPolicy, err := repo.getLabelPolicy(ctx, privateLabelingOrgID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -426,6 +426,9 @@ func (l *Login) getOrgID(authReq *domain.AuthRequest) string {
|
|||||||
|
|
||||||
func (l *Login) getPrivateLabelingID(authReq *domain.AuthRequest) string {
|
func (l *Login) getPrivateLabelingID(authReq *domain.AuthRequest) string {
|
||||||
privateLabelingOrgID := domain.IAMID
|
privateLabelingOrgID := domain.IAMID
|
||||||
|
if authReq == nil {
|
||||||
|
return privateLabelingOrgID
|
||||||
|
}
|
||||||
if authReq.PrivateLabelingSetting != domain.PrivateLabelingSettingUnspecified {
|
if authReq.PrivateLabelingSetting != domain.PrivateLabelingSettingUnspecified {
|
||||||
privateLabelingOrgID = authReq.ApplicationResourceOwner
|
privateLabelingOrgID = authReq.ApplicationResourceOwner
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user