mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 10:21:28 +00:00
Merge pull request #907 from sharelatex/sk-email-based-account-merge
Email based account merge
This commit is contained in:
commit
9852a916da
4 changed files with 19 additions and 6 deletions
|
@ -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) ->
|
||||
|
|
|
@ -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) -> """
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
define [
|
||||
"base"
|
||||
], (App) ->
|
||||
App.controller "AccountMergeCheckerController", ($scope) ->
|
||||
$scope.hasOlAccount = null
|
Loading…
Reference in a new issue