mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-28 05:54:43 -04:00
Update to support optional email register and signin
This commit is contained in:
parent
52772829ce
commit
a73d9ce39e
14 changed files with 180 additions and 16 deletions
lib
|
@ -66,7 +66,10 @@ function showIndex(req, res, next) {
|
|||
gitlab: config.gitlab,
|
||||
dropbox: config.dropbox,
|
||||
google: config.google,
|
||||
signin: req.isAuthenticated()
|
||||
email: config.email,
|
||||
signin: req.isAuthenticated(),
|
||||
infoMessage: req.flash('info'),
|
||||
errorMessage: req.flash('error')
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -94,7 +97,8 @@ function responseHackMD(res, note) {
|
|||
github: config.github,
|
||||
gitlab: config.gitlab,
|
||||
dropbox: config.dropbox,
|
||||
google: config.google
|
||||
google: config.google,
|
||||
email: config.email
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -202,9 +206,9 @@ function showPublishNote(req, res, next) {
|
|||
body: body,
|
||||
useCDN: config.usecdn,
|
||||
owner: note.owner ? note.owner.id : null,
|
||||
ownerprofile: note.owner ? models.User.parseProfile(note.owner.profile) : null,
|
||||
ownerprofile: note.owner ? models.User.getProfile(note.owner) : null,
|
||||
lastchangeuser: note.lastchangeuser ? note.lastchangeuser.id : null,
|
||||
lastchangeuserprofile: note.lastchangeuser ? models.User.parseProfile(note.lastchangeuser.profile) : null,
|
||||
lastchangeuserprofile: note.lastchangeuser ? models.User.getProfile(note.lastchangeuser) : null,
|
||||
robots: meta.robots || false, //default allow robots
|
||||
GA: meta.GA,
|
||||
disqus: meta.disqus
|
||||
|
@ -591,9 +595,9 @@ function showPublishSlide(req, res, next) {
|
|||
meta: JSON.stringify(obj.meta || {}),
|
||||
useCDN: config.usecdn,
|
||||
owner: note.owner ? note.owner.id : null,
|
||||
ownerprofile: note.owner ? models.User.parseProfile(note.owner.profile) : null,
|
||||
ownerprofile: note.owner ? models.User.getProfile(note.owner) : null,
|
||||
lastchangeuser: note.lastchangeuser ? note.lastchangeuser.id : null,
|
||||
lastchangeuserprofile: note.lastchangeuser ? models.User.parseProfile(note.lastchangeuser.profile) : null,
|
||||
lastchangeuserprofile: note.lastchangeuser ? models.User.getProfile(note.lastchangeuser) : null,
|
||||
robots: meta.robots || false, //default allow robots
|
||||
GA: meta.GA,
|
||||
disqus: meta.disqus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue