fix: respect PrivateLabelingSetting on project for login texts (#8744)

# Which Problems Are Solved

Admins can set the branding to be used from the project's organization.
Until now, only the branding (colors) were respected, but texts were
still loaded from the user's organization.

# How the Problems Are Solved

Respect the setting when loading the texts for the login pages.

# Additional Changes

None

# Additional Context

- closes #8502
This commit is contained in:
Livio Spring 2024-10-09 11:02:28 +02:00 committed by GitHub
parent 17303d1524
commit 94f267d475
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -726,7 +726,7 @@ func (repo *AuthRequestRepo) fillPolicies(ctx context.Context, request *domain.A
request.DefaultTranslations = defaultLoginTranslations
}
if len(request.OrgTranslations) == 0 || request.PolicyOrgID() != orgID {
orgLoginTranslations, err := repo.getLoginTexts(ctx, orgID)
orgLoginTranslations, err := repo.getLoginTexts(ctx, request.PrivateLabelingOrgID(orgID))
if err != nil {
return err
}