mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
ed80a8bb1e
* feat(actions): begin api * feat(actions): begin api * api and projections * fix: handle multiple statements for a single event in projections * export func type * fix test * update to new reduce interface * flows in login * feat: jwt idp * feat: command side * feat: add tests * actions and flows * fill idp views with jwt idps and return apis * add jwtEndpoint to jwt idp * begin jwt request handling * add feature * merge * merge * handle jwt idp * cleanup * bug fixes * autoregister * get token from specific header name * fix: proto * fixes * i18n * begin tests * fix and log http proxy * remove docker cache * fixes * usergrants in actions api * tests adn cleanup * cleanup * fix add user grant * set login context * i18n Co-authored-by: fabi <fabienne.gerschwiler@gmail.com>
76 lines
2.3 KiB
Go
76 lines
2.3 KiB
Go
package domain
|
|
|
|
import (
|
|
"time"
|
|
|
|
es_models "github.com/caos/zitadel/internal/eventstore/v1/models"
|
|
)
|
|
|
|
const (
|
|
FeatureLoginPolicy = "login_policy"
|
|
FeatureLoginPolicyFactors = FeatureLoginPolicy + ".factors"
|
|
FeatureLoginPolicyIDP = FeatureLoginPolicy + ".idp"
|
|
FeatureLoginPolicyPasswordless = FeatureLoginPolicy + ".passwordless"
|
|
FeatureLoginPolicyRegistration = FeatureLoginPolicy + ".registration"
|
|
FeatureLoginPolicyUsernameLogin = FeatureLoginPolicy + ".username_login"
|
|
FeatureLoginPolicyPasswordReset = FeatureLoginPolicy + ".password_reset"
|
|
FeaturePasswordComplexityPolicy = "password_complexity_policy"
|
|
FeatureLabelPolicy = "label_policy"
|
|
FeatureLabelPolicyPrivateLabel = FeatureLabelPolicy + ".private_label"
|
|
FeatureLabelPolicyWatermark = FeatureLabelPolicy + ".watermark"
|
|
FeatureCustomDomain = "custom_domain"
|
|
FeaturePrivacyPolicy = "privacy_policy"
|
|
FeatureLockoutPolicy = "lockout_policy"
|
|
FeatureMetadata = "metadata"
|
|
FeatureCustomText = "custom_text"
|
|
FeatureCustomTextMessage = FeatureCustomText + ".message"
|
|
FeatureCustomTextLogin = FeatureCustomText + ".login"
|
|
FeatureMetadataUser = FeatureMetadata + ".user"
|
|
FeatureActions = "actions"
|
|
)
|
|
|
|
type Features struct {
|
|
es_models.ObjectRoot
|
|
|
|
TierName string
|
|
TierDescription string
|
|
State FeaturesState
|
|
StateDescription string
|
|
IsDefault bool
|
|
|
|
AuditLogRetention time.Duration
|
|
LoginPolicyFactors bool
|
|
LoginPolicyIDP bool
|
|
LoginPolicyPasswordless bool
|
|
LoginPolicyRegistration bool
|
|
LoginPolicyUsernameLogin bool
|
|
LoginPolicyPasswordReset bool
|
|
PasswordComplexityPolicy bool
|
|
LabelPolicyPrivateLabel bool
|
|
LabelPolicyWatermark bool
|
|
CustomDomain bool
|
|
CustomTextMessage bool
|
|
CustomTextLogin bool
|
|
PrivacyPolicy bool
|
|
MetadataUser bool
|
|
LockoutPolicy bool
|
|
Actions bool
|
|
}
|
|
|
|
type FeaturesState int32
|
|
|
|
const (
|
|
FeaturesStateUnspecified FeaturesState = iota
|
|
FeaturesStateActive
|
|
FeaturesStateActionRequired
|
|
FeaturesStateCanceled
|
|
FeaturesStateGrandfathered
|
|
FeaturesStateRemoved
|
|
|
|
featuresStateCount
|
|
)
|
|
|
|
func (f FeaturesState) Valid() bool {
|
|
return f >= 0 && f < featuresStateCount
|
|
}
|