diff --git a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee index f8d90756b2..d301ddabbc 100644 --- a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee +++ b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee @@ -44,7 +44,7 @@ module.exports = AuthenticationController = return callback(err) req.sessionStore.generate(req) for key, value of oldSession - req.session[key] = value + req.session[key] = value unless key == '__tmp' # copy to the old `session.user` location, for backward-comptability req.session.user = req.session.passport.user req.session.save (err) -> diff --git a/services/web/app/coffee/Features/Email/EmailBuilder.coffee b/services/web/app/coffee/Features/Email/EmailBuilder.coffee index e2e8311286..3326f8522b 100644 --- a/services/web/app/coffee/Features/Email/EmailBuilder.coffee +++ b/services/web/app/coffee/Features/Email/EmailBuilder.coffee @@ -40,6 +40,23 @@ The #{settings.appName} Team - #{settings.siteUrl} templates = {} +templates.accountMergeToOverleafAddress = CTAEmailTemplate({ + subject: () -> "Confirm Account Merge - #{settings.appName}" + title: () -> "Confirm Account Merge" + message: () -> + """ + To merge your ShareLaTeX and Overleaf accounts, click the button below. + If you think you have received this message in error, + please contact us at https://www.overleaf.com/contact + """ + ctaText: () -> "Confirm Account Merge" + ctaURL: (opts) -> opts.tokenLinkUrl + secondaryMessage: (opts) -> + "If the button does not appear, open this link in your browser: #{opts.tokenLinkUrl}" +}) + +templates.accountMergeToSharelatexAddress = templates.accountMergeToOverleafAddress + templates.registered = CTAEmailTemplate({ subject: () -> "Activate your #{settings.appName} Account" message: (opts) -> """ diff --git a/services/web/app/coffee/router.coffee b/services/web/app/coffee/router.coffee index b196c56870..b02db419e4 100644 --- a/services/web/app/coffee/router.coffee +++ b/services/web/app/coffee/router.coffee @@ -68,6 +68,7 @@ module.exports = class Router webRouter.get '/logout', UserController.logout webRouter.get '/restricted', AuthorizationMiddlewear.restricted + if Features.hasFeature('registration') webRouter.get '/register', UserPagesController.registerPage AuthenticationController.addEndpointToLoginWhitelist '/register' diff --git a/services/web/public/coffee/main/account-merge-checker.coffee b/services/web/public/coffee/main/account-merge-checker.coffee deleted file mode 100644 index caeb3011ca..0000000000 --- a/services/web/public/coffee/main/account-merge-checker.coffee +++ /dev/null @@ -1,5 +0,0 @@ -define [ - "base" -], (App) -> - App.controller "AccountMergeCheckerController", ($scope) -> - $scope.hasOlAccount = null