mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:57:32 +00:00
fix: add prompt on oidc rp, fix idp and login policy in console (#769)
* fix: add prompt on oidc rp * fix: add prompt on oidc rp * fix: translation * fix: translation * fix: not existing login policy * fix: login policy * fix: identity provider detail * fix: idp update * fix: idps in login policy * fix: lint * fix: scss * fix: external idps on auth user detail * fix: idp create mapping fields * fix: remove idp provider * fix: angular lint * fix: login policy view * fix: translations
This commit is contained in:
@@ -64,7 +64,7 @@ type loginPolicyViewProvider interface {
|
||||
}
|
||||
|
||||
type idpProviderViewProvider interface {
|
||||
IDPProvidersByAggregateID(string) ([]*iam_view_model.IDPProviderView, error)
|
||||
IDPProvidersByAggregateIDAndState(string, iam_model.IDPConfigState) ([]*iam_view_model.IDPProviderView, error)
|
||||
}
|
||||
|
||||
type userEventProvider interface {
|
||||
@@ -553,13 +553,13 @@ func (repo *AuthRequestRepo) getLoginPolicy(ctx context.Context, orgID string) (
|
||||
|
||||
func getLoginPolicyIDPProviders(provider idpProviderViewProvider, iamID, orgID string, defaultPolicy bool) ([]*iam_model.IDPProviderView, error) {
|
||||
if defaultPolicy {
|
||||
idpProviders, err := provider.IDPProvidersByAggregateID(iamID)
|
||||
idpProviders, err := provider.IDPProvidersByAggregateIDAndState(iamID, iam_model.IDPConfigStateActive)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return iam_es_model.IDPProviderViewsToModel(idpProviders), nil
|
||||
}
|
||||
idpProviders, err := provider.IDPProvidersByAggregateID(orgID)
|
||||
idpProviders, err := provider.IDPProvidersByAggregateIDAndState(orgID, iam_model.IDPConfigStateActive)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -112,6 +112,7 @@ func (m *IDPProvider) fillData(provider *iam_view_model.IDPProviderView) (err er
|
||||
func (m *IDPProvider) fillConfigData(provider *iam_view_model.IDPProviderView, config *iam_model.IDPConfig) {
|
||||
provider.Name = config.Name
|
||||
provider.IDPConfigType = int32(config.Type)
|
||||
provider.IDPState = int32(config.State)
|
||||
}
|
||||
|
||||
func (m *IDPProvider) OnError(event *models.Event, err error) error {
|
||||
|
@@ -20,8 +20,8 @@ func (v *View) IDPProvidersByIDPConfigID(idpConfigID string) ([]*model.IDPProvid
|
||||
return view.IDPProvidersByIdpConfigID(v.Db, idpProviderTable, idpConfigID)
|
||||
}
|
||||
|
||||
func (v *View) IDPProvidersByAggregateID(aggregateID string) ([]*model.IDPProviderView, error) {
|
||||
return view.IDPProvidersByAggregateID(v.Db, idpProviderTable, aggregateID)
|
||||
func (v *View) IDPProvidersByAggregateIDAndState(aggregateID string, idpConfigState iam_model.IDPConfigState) ([]*model.IDPProviderView, error) {
|
||||
return view.IDPProvidersByAggregateIDAndState(v.Db, idpProviderTable, aggregateID, idpConfigState)
|
||||
}
|
||||
|
||||
func (v *View) SearchIDPProviders(request *iam_model.IDPProviderSearchRequest) ([]*model.IDPProviderView, uint64, error) {
|
||||
|
Reference in New Issue
Block a user