From 958c7a19b6460ae2e39a1a80d1543bb354d13b73 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Mon, 10 Sep 2018 11:41:03 +0100 Subject: [PATCH] Add a skeleton of a callback endpoint for merging accounts via email --- .../AccountMergeEmailController.coffee | 5 +++++ services/web/app/coffee/router.coffee | 3 +++ services/web/app/views/account_merge/finish.pug | 15 +++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 services/web/app/coffee/Features/AccountMerge/AccountMergeEmailController.coffee create mode 100644 services/web/app/views/account_merge/finish.pug diff --git a/services/web/app/coffee/Features/AccountMerge/AccountMergeEmailController.coffee b/services/web/app/coffee/Features/AccountMerge/AccountMergeEmailController.coffee new file mode 100644 index 0000000000..354b983d6e --- /dev/null +++ b/services/web/app/coffee/Features/AccountMerge/AccountMergeEmailController.coffee @@ -0,0 +1,5 @@ + +module.exports = AccountMergeEmailController = + + confirmMergeFromEmail: (req, res, next) -> + return res.render('account_merge/finish', {}) diff --git a/services/web/app/coffee/router.coffee b/services/web/app/coffee/router.coffee index b196c56870..2f5bff9ab0 100644 --- a/services/web/app/coffee/router.coffee +++ b/services/web/app/coffee/router.coffee @@ -50,6 +50,7 @@ TokenAccessController = require('./Features/TokenAccess/TokenAccessController') Features = require('./infrastructure/Features') LinkedFilesRouter = require './Features/LinkedFiles/LinkedFilesRouter' TemplatesRouter = require './Features/Templates/TemplatesRouter' +AccountMergeEmailController = require './Features/AccountMerge/AccountMergeEmailController' logger = require("logger-sharelatex") _ = require("underscore") @@ -68,6 +69,8 @@ module.exports = class Router webRouter.get '/logout', UserController.logout webRouter.get '/restricted', AuthorizationMiddlewear.restricted + webRouter.get '/account-merge/email/confirm', AccountMergeEmailController.confirmMergeFromEmail + if Features.hasFeature('registration') webRouter.get '/register', UserPagesController.registerPage AuthenticationController.addEndpointToLoginWhitelist '/register' diff --git a/services/web/app/views/account_merge/finish.pug b/services/web/app/views/account_merge/finish.pug new file mode 100644 index 0000000000..ef6d0a1428 --- /dev/null +++ b/services/web/app/views/account_merge/finish.pug @@ -0,0 +1,15 @@ +extends ../layout + +block content + .content.content-alt + .container + .row + .col-md-12.col-lg-10.col-lg-offset-1 + .card + .page-header + h1 Account Merge Complete + + div.container-fluid + .row + .col-md-12 + p Test