mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 11:47:42 +00:00

# Which Problems Are Solved Solves #8976 # Additional Changes I have done some intensive refactorings and we are using the new @zitadel/client package for GRPC access. # Additional Context - Closes #8976 --------- Co-authored-by: Max Peintner <peintnerm@gmail.com>
44 lines
1.5 KiB
Go
44 lines
1.5 KiB
Go
package query
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
"github.com/zitadel/zitadel/internal/feature"
|
|
)
|
|
|
|
type InstanceFeatures struct {
|
|
Details *domain.ObjectDetails
|
|
LoginDefaultOrg FeatureSource[bool]
|
|
TriggerIntrospectionProjections FeatureSource[bool]
|
|
LegacyIntrospection FeatureSource[bool]
|
|
UserSchema FeatureSource[bool]
|
|
TokenExchange FeatureSource[bool]
|
|
Actions FeatureSource[bool]
|
|
ImprovedPerformance FeatureSource[[]feature.ImprovedPerformanceType]
|
|
WebKey FeatureSource[bool]
|
|
DebugOIDCParentError FeatureSource[bool]
|
|
OIDCSingleV1SessionTermination FeatureSource[bool]
|
|
DisableUserTokenEvent FeatureSource[bool]
|
|
EnableBackChannelLogout FeatureSource[bool]
|
|
LoginV2 FeatureSource[*feature.LoginV2]
|
|
PermissionCheckV2 FeatureSource[bool]
|
|
ConsoleUseV2UserApi FeatureSource[bool]
|
|
}
|
|
|
|
func (q *Queries) GetInstanceFeatures(ctx context.Context, cascade bool) (_ *InstanceFeatures, err error) {
|
|
var system *SystemFeatures
|
|
if cascade {
|
|
system, err = q.GetSystemFeatures(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
m := NewInstanceFeaturesReadModel(ctx, system)
|
|
if err = q.eventstore.FilterToQueryReducer(ctx, m); err != nil {
|
|
return nil, err
|
|
}
|
|
m.instance.Details = readModelToObjectDetails(m.ReadModel)
|
|
return m.instance, nil
|
|
}
|