mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:27:42 +00:00
feat(cnsl): docs link can be customized and custom button is available (#7840)
* feat: customize doc link and additional custom link * feat: add e2e tests * fix: update docs * fix: add @peintnermax changes about cache * fix: golangci-lint complains preparation.PrepareCommands --------- Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
@@ -26,10 +26,13 @@ type PrivacyPolicy struct {
|
||||
ResourceOwner string
|
||||
State domain.PolicyState
|
||||
|
||||
TOSLink string
|
||||
PrivacyLink string
|
||||
HelpLink string
|
||||
SupportEmail domain.EmailAddress
|
||||
TOSLink string
|
||||
PrivacyLink string
|
||||
HelpLink string
|
||||
SupportEmail domain.EmailAddress
|
||||
DocsLink string
|
||||
CustomLink string
|
||||
CustomLinkText string
|
||||
|
||||
IsDefault bool
|
||||
}
|
||||
@@ -91,6 +94,18 @@ var (
|
||||
name: projection.PrivacyPolicyOwnerRemovedCol,
|
||||
table: privacyTable,
|
||||
}
|
||||
PrivacyColDocsLink = Column{
|
||||
name: projection.PrivacyPolicyDocsLinkCol,
|
||||
table: privacyTable,
|
||||
}
|
||||
PrivacyColCustomLink = Column{
|
||||
name: projection.PrivacyPolicyCustomLinkCol,
|
||||
table: privacyTable,
|
||||
}
|
||||
PrivacyColCustomLinkText = Column{
|
||||
name: projection.PrivacyPolicyCustomLinkTextCol,
|
||||
table: privacyTable,
|
||||
}
|
||||
)
|
||||
|
||||
func (q *Queries) PrivacyPolicyByOrg(ctx context.Context, shouldTriggerBulk bool, orgID string, withOwnerRemoved bool) (policy *PrivacyPolicy, err error) {
|
||||
@@ -168,6 +183,9 @@ func preparePrivacyPolicyQuery(ctx context.Context, db prepareDatabase) (sq.Sele
|
||||
PrivacyColTOSLink.identifier(),
|
||||
PrivacyColHelpLink.identifier(),
|
||||
PrivacyColSupportEmail.identifier(),
|
||||
PrivacyColDocsLink.identifier(),
|
||||
PrivacyColCustomLink.identifier(),
|
||||
PrivacyColCustomLinkText.identifier(),
|
||||
PrivacyColIsDefault.identifier(),
|
||||
PrivacyColState.identifier(),
|
||||
).
|
||||
@@ -185,6 +203,9 @@ func preparePrivacyPolicyQuery(ctx context.Context, db prepareDatabase) (sq.Sele
|
||||
&policy.TOSLink,
|
||||
&policy.HelpLink,
|
||||
&policy.SupportEmail,
|
||||
&policy.DocsLink,
|
||||
&policy.CustomLink,
|
||||
&policy.CustomLinkText,
|
||||
&policy.IsDefault,
|
||||
&policy.State,
|
||||
)
|
||||
@@ -200,10 +221,13 @@ func preparePrivacyPolicyQuery(ctx context.Context, db prepareDatabase) (sq.Sele
|
||||
|
||||
func (p *PrivacyPolicy) ToDomain() *domain.PrivacyPolicy {
|
||||
return &domain.PrivacyPolicy{
|
||||
TOSLink: p.TOSLink,
|
||||
PrivacyLink: p.PrivacyLink,
|
||||
HelpLink: p.HelpLink,
|
||||
SupportEmail: p.SupportEmail,
|
||||
Default: p.IsDefault,
|
||||
TOSLink: p.TOSLink,
|
||||
PrivacyLink: p.PrivacyLink,
|
||||
HelpLink: p.HelpLink,
|
||||
SupportEmail: p.SupportEmail,
|
||||
Default: p.IsDefault,
|
||||
DocsLink: p.DocsLink,
|
||||
CustomLink: p.CustomLink,
|
||||
CustomLinkText: p.CustomLinkText,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user