mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #725 from sharelatex/ta-disable-emails-endpoint
Disable Emails Endpoint when externalAuthenticationSystemUsed is True
This commit is contained in:
commit
08aab38470
1 changed files with 12 additions and 9 deletions
|
@ -111,20 +111,23 @@ module.exports = class Router
|
||||||
webRouter.get '/user/emails',
|
webRouter.get '/user/emails',
|
||||||
AuthenticationController.requireLogin(),
|
AuthenticationController.requireLogin(),
|
||||||
UserEmailsController.list
|
UserEmailsController.list
|
||||||
webRouter.post '/user/emails',
|
|
||||||
AuthenticationController.requireLogin(),
|
|
||||||
UserEmailsController.add
|
|
||||||
webRouter.post '/user/emails/delete',
|
|
||||||
AuthenticationController.requireLogin(),
|
|
||||||
UserEmailsController.remove
|
|
||||||
webRouter.post '/user/emails/default',
|
|
||||||
AuthenticationController.requireLogin(),
|
|
||||||
UserEmailsController.setDefault
|
|
||||||
webRouter.get '/user/emails/confirm',
|
webRouter.get '/user/emails/confirm',
|
||||||
UserEmailsController.showConfirm
|
UserEmailsController.showConfirm
|
||||||
webRouter.post '/user/emails/confirm',
|
webRouter.post '/user/emails/confirm',
|
||||||
UserEmailsController.confirm
|
UserEmailsController.confirm
|
||||||
|
|
||||||
|
unless Features.externalAuthenticationSystemUsed()
|
||||||
|
webRouter.post '/user/emails',
|
||||||
|
AuthenticationController.requireLogin(),
|
||||||
|
UserEmailsController.add
|
||||||
|
webRouter.post '/user/emails/delete',
|
||||||
|
AuthenticationController.requireLogin(),
|
||||||
|
UserEmailsController.remove
|
||||||
|
webRouter.post '/user/emails/default',
|
||||||
|
AuthenticationController.requireLogin(),
|
||||||
|
UserEmailsController.setDefault
|
||||||
|
|
||||||
|
|
||||||
webRouter.get '/user/sessions',
|
webRouter.get '/user/sessions',
|
||||||
AuthenticationController.requireLogin(),
|
AuthenticationController.requireLogin(),
|
||||||
SudoModeMiddlewear.protectPage,
|
SudoModeMiddlewear.protectPage,
|
||||||
|
|
Loading…
Reference in a new issue