Introduce the sso marker for postInstallMessage

The marker is "=== sso ==="
The part before the marker is shown if sso i disabled,
the remaining part is shown when sso is enabled.

If no marker is found, the whole text is shown
This commit is contained in:
Johannes
2016-11-24 15:33:45 +01:00
parent 14ef7688b8
commit 2ca12db362
3 changed files with 17 additions and 2 deletions

View File

@@ -235,6 +235,21 @@ app.filter('markdown2html', function () {
};
});
app.filter('postInstallMessage', function () {
var SSO_MARKER = '=== sso ===';
return function (text, app) {
if (!app) return text;
var parts = text.split(SSO_MARKER);
if (parts.length === 1) return text;
if (app.sso) return parts[1];
else return parts[0];
};
});
// keep this in sync with eventlog.js
var ACTION_ACTIVATE = 'cloudron.activate';
var ACTION_APP_CONFIGURE = 'app.configure';