mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 09:37:23 +00:00

* feat: default custom message text * feat: org custom message text * feat: org custom message text * feat: custom messages query side * feat: default messages * feat: message text user fields * feat: check for inactive user * feat: fix send password reset * feat: fix custom org text * feat: add variables to docs * feat: custom text tests * feat: fix notifications * feat: add custom text feature * feat: add custom text feature * feat: feature in custom message texts * feat: add custom text feature in frontend * feat: merge main * feat: feature tests * feat: change phone message in setup * fix: remove unused code, add event translation * fix: merge main and fix problems * fix: english translation file * fix: migration versions * fix: setup * feat: fix pr requests * feat: fix phone code message * feat: migration * feat: setup * fix: remove unused tests Co-authored-by: Livio Amstutz <livio.a@gmail.com>
102 lines
2.4 KiB
Go
102 lines
2.4 KiB
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/caos/zitadel/internal/domain"
|
|
)
|
|
|
|
type FeaturesView struct {
|
|
AggregateID string
|
|
CreationDate time.Time
|
|
ChangeDate time.Time
|
|
Sequence uint64
|
|
Default bool
|
|
|
|
TierName string
|
|
TierDescription string
|
|
State domain.FeaturesState
|
|
StateDescription string
|
|
AuditLogRetention time.Duration
|
|
LoginPolicyFactors bool
|
|
LoginPolicyIDP bool
|
|
LoginPolicyPasswordless bool
|
|
LoginPolicyRegistration bool
|
|
LoginPolicyUsernameLogin bool
|
|
LoginPolicyPasswordReset bool
|
|
PasswordComplexityPolicy bool
|
|
LabelPolicyPrivateLabel bool
|
|
LabelPolicyWatermark bool
|
|
CustomDomain bool
|
|
CustomText bool
|
|
}
|
|
|
|
func (f *FeaturesView) FeatureList() []string {
|
|
list := make([]string, 0)
|
|
if f.LoginPolicyFactors {
|
|
list = append(list, domain.FeatureLoginPolicyFactors)
|
|
}
|
|
if f.LoginPolicyIDP {
|
|
list = append(list, domain.FeatureLoginPolicyIDP)
|
|
}
|
|
if f.LoginPolicyPasswordless {
|
|
list = append(list, domain.FeatureLoginPolicyPasswordless)
|
|
}
|
|
if f.LoginPolicyRegistration {
|
|
list = append(list, domain.FeatureLoginPolicyRegistration)
|
|
}
|
|
if f.LoginPolicyUsernameLogin {
|
|
list = append(list, domain.FeatureLoginPolicyUsernameLogin)
|
|
}
|
|
if f.LoginPolicyPasswordReset {
|
|
list = append(list, domain.FeatureLoginPolicyPasswordReset)
|
|
}
|
|
if f.PasswordComplexityPolicy {
|
|
list = append(list, domain.FeaturePasswordComplexityPolicy)
|
|
}
|
|
if f.LabelPolicyPrivateLabel {
|
|
list = append(list, domain.FeatureLabelPolicyPrivateLabel)
|
|
}
|
|
if f.LabelPolicyWatermark {
|
|
list = append(list, domain.FeatureLabelPolicyWatermark)
|
|
}
|
|
if f.CustomDomain {
|
|
list = append(list, domain.FeatureCustomDomain)
|
|
}
|
|
if f.CustomText {
|
|
list = append(list, domain.FeatureCustomText)
|
|
}
|
|
return list
|
|
}
|
|
|
|
type FeaturesSearchRequest struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
SortingColumn FeaturesSearchKey
|
|
Asc bool
|
|
Queries []*FeaturesSearchQuery
|
|
}
|
|
|
|
type FeaturesSearchKey int32
|
|
|
|
const (
|
|
FeaturesSearchKeyUnspecified FeaturesSearchKey = iota
|
|
FeaturesSearchKeyAggregateID
|
|
FeaturesSearchKeyDefault
|
|
)
|
|
|
|
type FeaturesSearchQuery struct {
|
|
Key FeaturesSearchKey
|
|
Method domain.SearchMethod
|
|
Value interface{}
|
|
}
|
|
|
|
type FeaturesSearchResult struct {
|
|
Offset uint64
|
|
Limit uint64
|
|
TotalResult uint64
|
|
Result []*FeaturesView
|
|
Sequence uint64
|
|
Timestamp time.Time
|
|
}
|