diff --git a/docs/references/manifest.md b/docs/references/manifest.md index ecd813e3b..65066c28f 100644 --- a/docs/references/manifest.md +++ b/docs/references/manifest.md @@ -280,6 +280,10 @@ The intended use of this field is to display some post installation steps that t complete the installation. For example, displaying the default admin credentials and informing the user to to change it. +The message can have the following special tags: +* ` ... ` - Content in `sso` blocks are shown if SSO enabled. +* ` ... `- Content in `nosso` blocks are shows when SSO is disabled. + ## optionalSso Type: boolean diff --git a/webadmin/src/js/index.js b/webadmin/src/js/index.js index 34b531d4f..fd72a0a9b 100644 --- a/webadmin/src/js/index.js +++ b/webadmin/src/js/index.js @@ -253,7 +253,11 @@ app.filter('postInstallMessage', function () { if (!app) return text; var parts = text.split(SSO_MARKER); - if (parts.length === 1) return text; + if (parts.length === 1) { + // [^] matches even newlines. '?' makes it non-greedy + if (app.sso) return text.replace(/\[^]*?\<\/nosso\>/g, ''); + else return text.replace(/\[^]*?\<\/sso\>/g, ''); + } if (app.sso) return parts[1]; else return parts[0];