mirror of
https://github.com/zitadel/zitadel.git
synced 2025-07-12 02:38:31 +00:00

# Which Problems Are Solved Actions v2 is not a feature flag anymore, include functionality on executions is not used and json tags of proto messages are handled incorrectly. # How the Problems Are Solved - Remove actions from the feature flags on system and instance level - Remove include type on executions, only in the API, later maybe in the handling logic as well - Use protojson in request and response handling of actions v2 # Additional Changes - Correct integration tests for request and response handling - Use json.RawMessage for events, so that the event payload is not base64 encoded - Added separate context for async webhook calls, that executions are not cancelled when called async # Additional Context Related to #9759 Closes #9710 --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
44 lines
1.3 KiB
Go
44 lines
1.3 KiB
Go
package query
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
"github.com/zitadel/zitadel/internal/feature"
|
|
)
|
|
|
|
type FeatureSource[T any] struct {
|
|
Level feature.Level
|
|
Value T
|
|
}
|
|
|
|
func (f *FeatureSource[T]) set(level feature.Level, value any) {
|
|
f.Level = level
|
|
f.Value = value.(T)
|
|
}
|
|
|
|
type SystemFeatures struct {
|
|
Details *domain.ObjectDetails
|
|
|
|
LoginDefaultOrg FeatureSource[bool]
|
|
TriggerIntrospectionProjections FeatureSource[bool]
|
|
LegacyIntrospection FeatureSource[bool]
|
|
UserSchema FeatureSource[bool]
|
|
TokenExchange FeatureSource[bool]
|
|
ImprovedPerformance FeatureSource[[]feature.ImprovedPerformanceType]
|
|
OIDCSingleV1SessionTermination FeatureSource[bool]
|
|
DisableUserTokenEvent FeatureSource[bool]
|
|
EnableBackChannelLogout FeatureSource[bool]
|
|
LoginV2 FeatureSource[*feature.LoginV2]
|
|
PermissionCheckV2 FeatureSource[bool]
|
|
}
|
|
|
|
func (q *Queries) GetSystemFeatures(ctx context.Context) (_ *SystemFeatures, err error) {
|
|
m := NewSystemFeaturesReadModel()
|
|
if err := q.eventstore.FilterToQueryReducer(ctx, m); err != nil {
|
|
return nil, err
|
|
}
|
|
m.system.Details = readModelToObjectDetails(m.ReadModel)
|
|
return m.system, nil
|
|
}
|