Skip to content

Commit

Permalink
Merge pull request #654 from MAhsenArif/872
Browse files Browse the repository at this point in the history
[MNOE-872] Expose session timeout config
  • Loading branch information
ouranos authored Mar 16, 2018
2 parents 9eef07c + 9b94d8b commit 94475d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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).to_json
%>)
3 changes: 3 additions & 0 deletions api/app/views/mno_enterprise/auth/sessions/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.registration
.container
.row
- if params[:session_timeout].present?
.alert.alert-warning.text-center
= t('mno_enterprise.auth.sessions.new.timeout')
.login-box-wrapper
.login-box-title
%h2= t('mno_enterprise.auth.sessions.new.title')
Expand Down
8 changes: 8 additions & 0 deletions core/config/locales/views/auth/sessions/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ en:
new:
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"

0 comments on commit 94475d9

Please sign in to comment.