Merge pull request #157 from clems4ever/already-logged-username
Add username to the 'already logged in' pagepull/156/head^2
commit
329927b865
|
@ -2,12 +2,16 @@ import Express = require("express");
|
|||
import Endpoints = require("../../../../../shared/api");
|
||||
import FirstFactorBlocker from "../FirstFactorBlocker";
|
||||
import BluebirdPromise = require("bluebird");
|
||||
import AuthenticationSession = require("../../AuthenticationSession");
|
||||
|
||||
export default FirstFactorBlocker(handler);
|
||||
|
||||
function handler(req: Express.Request, res: Express.Response): BluebirdPromise<void> {
|
||||
return AuthenticationSession.get(req)
|
||||
.then(function (authSession) {
|
||||
res.render("already-logged-in", {
|
||||
logout_endpoint: Endpoints.LOGOUT_GET
|
||||
logout_endpoint: Endpoints.LOGOUT_GET,
|
||||
username: authSession.userid
|
||||
});
|
||||
});
|
||||
return BluebirdPromise.resolve();
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ block form-header
|
|||
<img class="header-img" src="/img/success.png" alt="">
|
||||
|
||||
block content
|
||||
<p>You are already logged in.<br/>
|
||||
<p>You are already logged in as <b>#{ username }</b>.<br/>
|
||||
| Click <a href="#{ logout_endpoint }">here</a> to log off.<p>
|
||||
|
|
Loading…
Reference in New Issue