From 3c44524f140874fa4ade1b4ee48585737b517a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Garde?= Date: Mon, 15 Jan 2018 10:56:06 +1100 Subject: [PATCH 1/5] [MNOE-872] Expose session timeout config --- api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb b/api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb index 8904abf77..9cc49d2fb 100644 --- a/api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb +++ b/api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb @@ -25,5 +25,5 @@ angular.module('mnoEnterprise.configuration', []) .constant('APP_NAME', <%= MnoEnterprise.app_name.to_json %>) .constant('URL_CONFIG', <%= Hash(Settings.url_config).to_json %>) .constant('DEVISE_CONFIG', <%= - Hash(Settings.devise).merge(min_password_length: Devise.password_length.min).to_json + Hash(Settings.devise).merge(min_password_length: Devise.password_length.min, timeout_in: (Devise.timeout_in || 0).seconds).to_json %>) From c9e1717720747cf6ed6bdb9f913031298be8027e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Garde?= Date: Tue, 23 Jan 2018 15:35:20 +1100 Subject: [PATCH 2/5] [MNOE-872] Address code review --- api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb b/api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb index 9cc49d2fb..40225fefa 100644 --- a/api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb +++ b/api/app/assets/javascripts/mno_enterprise/config.js.coffee.erb @@ -25,5 +25,5 @@ angular.module('mnoEnterprise.configuration', []) .constant('APP_NAME', <%= MnoEnterprise.app_name.to_json %>) .constant('URL_CONFIG', <%= Hash(Settings.url_config).to_json %>) .constant('DEVISE_CONFIG', <%= - Hash(Settings.devise).merge(min_password_length: Devise.password_length.min, timeout_in: (Devise.timeout_in || 0).seconds).to_json + Hash(Settings.devise).merge(min_password_length: Devise.password_length.min, timeout_in: Devise.timeout_in).to_json %>) From 0c3dd9866f3dc10daff088c9525be0aaaaa9af05 Mon Sep 17 00:00:00 2001 From: MAhsenArif Date: Thu, 22 Feb 2018 18:32:47 +0500 Subject: [PATCH 3/5] [MNOE-872] Added text on login page if user session times out --- api/app/views/mno_enterprise/auth/sessions/new.html.haml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/app/views/mno_enterprise/auth/sessions/new.html.haml b/api/app/views/mno_enterprise/auth/sessions/new.html.haml index 6a1844864..c0f8b5d52 100644 --- a/api/app/views/mno_enterprise/auth/sessions/new.html.haml +++ b/api/app/views/mno_enterprise/auth/sessions/new.html.haml @@ -1,6 +1,9 @@ .registration .container .row + - if params[:session_timeout].present? + .alert.alert-warning.text-center + You are logged off due to inactivity. Please log in again .login-box-wrapper .login-box-title %h2= t('mno_enterprise.auth.sessions.new.title') From 4c815a175a16e60eb14cfd0072e50bbd6693e3cc Mon Sep 17 00:00:00 2001 From: MAhsenArif Date: Thu, 22 Feb 2018 23:11:36 +0500 Subject: [PATCH 4/5] [MNOE-872] locale for sesssion timeout message --- api/app/views/mno_enterprise/auth/sessions/new.html.haml | 2 +- core/config/locales/views/auth/sessions/en.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/app/views/mno_enterprise/auth/sessions/new.html.haml b/api/app/views/mno_enterprise/auth/sessions/new.html.haml index c0f8b5d52..0319ff47b 100644 --- a/api/app/views/mno_enterprise/auth/sessions/new.html.haml +++ b/api/app/views/mno_enterprise/auth/sessions/new.html.haml @@ -3,7 +3,7 @@ .row - if params[:session_timeout].present? .alert.alert-warning.text-center - You are logged off due to inactivity. Please log in again + = t('mno_enterprise.auth.sessions.new.timeout') .login-box-wrapper .login-box-title %h2= t('mno_enterprise.auth.sessions.new.title') diff --git a/core/config/locales/views/auth/sessions/en.yml b/core/config/locales/views/auth/sessions/en.yml index 54677c684..01ba46a29 100644 --- a/core/config/locales/views/auth/sessions/en.yml +++ b/core/config/locales/views/auth/sessions/en.yml @@ -5,3 +5,4 @@ en: new: title: Sign In sign_in: Sign in + timeout: You are logged off due to inactivity. Please log in again From 9b94d8bb54a7eb4d2570f307bfea3067d1a70e9b Mon Sep 17 00:00:00 2001 From: Olivier Brisse Date: Tue, 13 Mar 2018 11:07:56 +1100 Subject: [PATCH 5/5] [MNOE-872] Add locales --- core/config/locales/views/auth/sessions/en.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/config/locales/views/auth/sessions/en.yml b/core/config/locales/views/auth/sessions/en.yml index 01ba46a29..50046531b 100644 --- a/core/config/locales/views/auth/sessions/en.yml +++ b/core/config/locales/views/auth/sessions/en.yml @@ -6,3 +6,10 @@ en: title: Sign In sign_in: Sign in timeout: You are logged off due to inactivity. Please log in again + timeout: + header: "Session Timeout" + body: + can_login: "Your session has expired due to inactivity. You can extend your session or log out by clicking on the relevant option below" + stay_logged_in: "Stay Logged In" + log_off: "Log Off" + error: "We could not manage to remain you logged in. You will be redirected to the login page"