mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-13 19:09:16 +00:00
fix: check if application is active in saml logic (#6003)
Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -53,6 +53,9 @@ func (p *Storage) GetEntityByID(ctx context.Context, entityID string) (*servicep
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if app.State != domain.AppStateActive {
|
||||||
|
return nil, errors.ThrowPreconditionFailed(nil, "SAML-sdaGg", "app is not active")
|
||||||
|
}
|
||||||
return serviceprovider.NewServiceProvider(
|
return serviceprovider.NewServiceProvider(
|
||||||
app.ID,
|
app.ID,
|
||||||
&serviceprovider.Config{
|
&serviceprovider.Config{
|
||||||
@@ -67,6 +70,9 @@ func (p *Storage) GetEntityIDByAppID(ctx context.Context, appID string) (string,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
if app.State != domain.AppStateActive {
|
||||||
|
return "", errors.ThrowPreconditionFailed(nil, "SAML-sdaGg", "app is not active")
|
||||||
|
}
|
||||||
return app.SAMLConfig.EntityID, nil
|
return app.SAMLConfig.EntityID, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user