fix: set correct state of idp in old view (#3148)

* fix: set correct state of idp in old view

* add italian to language selection in login
This commit is contained in:
Livio Amstutz 2022-02-01 18:12:18 +01:00 committed by GitHub
parent bf6cb59b87
commit f96f62a1ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 42 additions and 13 deletions

View File

@ -3,20 +3,19 @@ package handler
import (
"context"
"github.com/caos/zitadel/internal/domain"
"github.com/caos/zitadel/internal/eventstore/v1"
query2 "github.com/caos/zitadel/internal/query"
"github.com/caos/logging"
"github.com/caos/zitadel/internal/config/systemdefaults"
org_es_model "github.com/caos/zitadel/internal/org/repository/eventsourcing/model"
"github.com/caos/zitadel/internal/config/systemdefaults"
"github.com/caos/zitadel/internal/domain"
v1 "github.com/caos/zitadel/internal/eventstore/v1"
es_models "github.com/caos/zitadel/internal/eventstore/v1/models"
"github.com/caos/zitadel/internal/eventstore/v1/query"
"github.com/caos/zitadel/internal/eventstore/v1/spooler"
iam_model "github.com/caos/zitadel/internal/iam/model"
"github.com/caos/zitadel/internal/iam/repository/eventsourcing/model"
iam_view_model "github.com/caos/zitadel/internal/iam/repository/view/model"
org_es_model "github.com/caos/zitadel/internal/org/repository/eventsourcing/model"
query2 "github.com/caos/zitadel/internal/query"
)
const (
@ -166,7 +165,16 @@ func (i *IDPProvider) fillConfigData(provider *iam_view_model.IDPProviderView, c
} else if config.JWTIDP != nil {
provider.IDPConfigType = int32(domain.IDPConfigTypeJWT)
}
provider.IDPState = int32(config.State)
switch config.State {
case domain.IDPConfigStateActive:
provider.IDPState = int32(iam_model.IDPConfigStateActive)
case domain.IDPConfigStateInactive:
provider.IDPState = int32(iam_model.IDPConfigStateActive)
case domain.IDPConfigStateRemoved:
provider.IDPState = int32(iam_model.IDPConfigStateRemoved)
default:
provider.IDPState = int32(iam_model.IDPConfigStateActive)
}
}
func (i *IDPProvider) OnError(event *es_models.Event, err error) error {

View File

@ -207,6 +207,7 @@ RegistrationUser:
LanguageLabel: Sprache
German: Deutsch
English: English
Italian: Italiano
GenderLabel: Geschlecht
Female: weiblich
Male: männlich
@ -234,6 +235,7 @@ ExternalRegistrationUserOverview:
LanguageLabel: Sprache
German: Deutsch
English: English
Italian: Italiano
TosAndPrivacyLabel: Allgemeine Geschäftsbedingungen und Datenschutz
TosConfirm: Ich akzeptiere die
TosLinkText: AGBs
@ -286,6 +288,9 @@ ExternalNotFoundOption:
TosLinkText: AGBs
TosConfirmAnd: und die
PrivacyLinkText: Datenschutzerklärung
German: Deutsch
English: English
Italian: Italiano
Footer:
PoweredBy: Powered By

View File

@ -207,6 +207,7 @@ RegistrationUser:
LanguageLabel: Language
German: Deutsch
English: English
Italian: Italiano
GenderLabel: Gender
Female: Female
Male: Male
@ -234,6 +235,7 @@ ExternalRegistrationUserOverview:
LanguageLabel: Language
German: Deutsch
English: English
Italian: Italiano
TosAndPrivacyLabel: Terms and conditions
TosConfirm: I accept the
TosLinkText: TOS
@ -287,6 +289,9 @@ ExternalNotFoundOption:
TosLinkText: TOS
TosConfirmAnd: and the
PrivacyLinkText: privacy policy
German: Deutsch
English: English
Italian: Italiano
Footer:
PoweredBy: Powered By

View File

@ -205,8 +205,9 @@ RegistrationUser:
FirstnameLabel: Nome
LastnameLabel: Cognome
LanguageLabel: Lingua
German: Tedesco
English: Inglese
German: Deutsch
English: English
Italian: Italiano
GenderLabel: Genere
Female: Femminile
Male: Maschile
@ -232,8 +233,9 @@ ExternalRegistrationUserOverview:
NicknameLabel: Soprannome
PhoneLabel: Numero di telefono
LanguageLabel: Lingua
German: Tedesco
English: Inglese
German: Deutsch
English: English
Italian: Italiano
TosAndPrivacyLabel: Termini di servizio
TosConfirm: Accetto i
TosLinkText: Termini di servizio
@ -287,6 +289,9 @@ ExternalNotFoundOption:
TosLinkText: Termini di servizio
TosConfirmAnd: e
PrivacyLinkText: l'informativa sulla privacy
German: Deutsch
English: English
Italian: Italiano
Footer:
PoweredBy: Alimentato da

View File

@ -64,6 +64,8 @@
</option>
<option value="en" id="en" {{if (selectedLanguage "en")}} selected {{end}}>{{t "ExternalNotFoundOption.English"}}
</option>
<option value="it" id="it" {{if (selectedLanguage "it")}} selected {{end}}>{{t "ExternalNotFoundOption.Italian"}}
</option>
</select>
</div>
</div>
@ -116,4 +118,4 @@
<script src="{{ resourceUrl "scripts/form_submit.js" }}"></script>
<script src="{{ resourceUrl "scripts/external_not_found_check.js" }}"></script>
{{template "main-bottom" .}}
{{template "main-bottom" .}}

View File

@ -64,6 +64,8 @@
</option>
<option value="en" id="en" {{if (selectedLanguage "en")}} selected {{end}}>{{t "ExternalRegistrationUserOverview.English"}}
</option>
<option value="it" id="it" {{if (selectedLanguage "it")}} selected {{end}}>{{t "ExternalRegistrationUserOverview.Italian"}}
</option>
</select>
</div>
</div>

View File

@ -58,6 +58,8 @@
</option>
<option value="en" id="en" {{if (selectedLanguage "en")}} selected {{end}}>{{t "RegistrationUser.English"}}
</option>
<option value="it" id="it" {{if (selectedLanguage "it")}} selected {{end}}>{{t "RegistrationUser.Italian"}}
</option>
</select>
</div>
<div class="lgn-field" >
@ -139,4 +141,4 @@
<script src="{{ resourceUrl "scripts/password_policy_check.js" }}"></script>
<script src="{{ resourceUrl "scripts/register_check.js" }}"></script>
{{template "main-bottom" .}}
{{template "main-bottom" .}}