mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:47:32 +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:
32
e2e/cypress/support/api/external-links-settings.ts
Normal file
32
e2e/cypress/support/api/external-links-settings.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { ensureSetting } from './ensure';
|
||||
import { API } from './types';
|
||||
|
||||
export function ensureExternalLinksSettingsSet(api: API, tosLink: string, privacyPolicyLink: string, docsLink: string) {
|
||||
return ensureSetting(
|
||||
api,
|
||||
`${api.adminBaseURL}/policies/privacy`,
|
||||
(body: any) => {
|
||||
const result = {
|
||||
sequence: body.policy?.details?.sequence,
|
||||
id: body.policy.id,
|
||||
entity: null,
|
||||
};
|
||||
|
||||
if (
|
||||
body.policy &&
|
||||
body.policy.tosLink === tosLink &&
|
||||
body.policy.privacyLink === privacyPolicyLink &&
|
||||
body.policy.docsLink === docsLink
|
||||
) {
|
||||
return { ...result, entity: body.policy };
|
||||
}
|
||||
return result;
|
||||
},
|
||||
`${api.adminBaseURL}/policies/privacy`,
|
||||
{
|
||||
tosLink,
|
||||
privacyLink: privacyPolicyLink,
|
||||
docsLink,
|
||||
},
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user