better naming of the dashboard functions

This commit is contained in:
Girish Ramakrishnan
2023-08-13 10:29:24 +05:30
parent e723c3c19b
commit a7be30a816
7 changed files with 55 additions and 60 deletions

View File

@@ -5,6 +5,7 @@ exports = module.exports = {
uninitialize,
onActivated,
onDashboardLocationChanged,
getStatus
};
@@ -228,3 +229,16 @@ async function onActivated(restoreOptions) {
await timers.setTimeout(30000);
await reverseProxy.writeDefaultConfig({ activated :true });
}
async function onDashboardLocationChanged(auditSource) {
assert.strictEqual(typeof auditSource, 'object');
// mark apps using oidc addon to be reconfigured
const [, installedApps] = await safe(apps.list());
await safe(apps.configureInstalledApps(installedApps.filter((a) => !!a.manifest.addons.oidc), auditSource));
await safe(services.rebuildService('turn', auditSource), { debug }); // to update the realm variable
await oidc.stop();
await oidc.start();
}