From c0a17b45ec3d033f520df20d3b1d563fbdd3eb53 Mon Sep 17 00:00:00 2001 From: ste Date: Thu, 10 Jan 2019 00:01:49 +0000 Subject: [PATCH 1/2] GPII-3496: Added storing of the user token on session start. --- siteconfig.json5 | 5 ++++- src/main/siteConfigurationHandler.js | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/siteconfig.json5 b/siteconfig.json5 index 566828c23..f1d3ab7e7 100644 --- a/siteconfig.json5 +++ b/siteconfig.json5 @@ -74,5 +74,8 @@ }, // URL to the the place serving the survey triggers data. Note that it should return triggers in JSON format - surveyTriggersUrl: "http://survey.gpii.net/survey-triggers.json" + surveyTriggersUrl: "http://survey.gpii.net/survey-triggers.json", + + // Store the last login token, and automatically login when morphic is next started. + saveLogin: false } diff --git a/src/main/siteConfigurationHandler.js b/src/main/siteConfigurationHandler.js index 14ab661f6..26321caeb 100644 --- a/src/main/siteConfigurationHandler.js +++ b/src/main/siteConfigurationHandler.js @@ -95,6 +95,10 @@ fluid.defaults("gpii.app.siteConfigurationHandler", { distributeAboutDialogConfig: { record: "{that}.options.siteConfig.aboutDialog", target: "{app aboutDialog}.options.siteConfig" + }, + distributeSaveLogin: { + record: "{that}.options.siteConfig.saveLogin", + target: "{/ gpii.userListeners.autoLogin}.options.saveLastLogin" } } }); From b4b8279e18b7439393f15bf9a20aa0524f631cb2 Mon Sep 17 00:00:00 2001 From: ste Date: Thu, 10 Jan 2019 00:07:37 +0000 Subject: [PATCH 2/2] GPII-3496: Improved comment for saveLogin --- siteconfig.json5 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/siteconfig.json5 b/siteconfig.json5 index f1d3ab7e7..fd2702379 100644 --- a/siteconfig.json5 +++ b/siteconfig.json5 @@ -77,5 +77,7 @@ surveyTriggersUrl: "http://survey.gpii.net/survey-triggers.json", // Store the last login token, and automatically login when morphic is next started. + // Warning: This will cause the user's login token to be stored on the machine. This should be false for shared or + // public access computers. saveLogin: false }