mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #935 from sharelatex/as-teams-redirect
Add route to handle /teams similar to v1
This commit is contained in:
commit
2d9cadb487
1 changed files with 8 additions and 0 deletions
|
@ -330,6 +330,14 @@ module.exports = class Router
|
||||||
AuthenticationController.httpAuth,
|
AuthenticationController.httpAuth,
|
||||||
CompileController.getFileFromClsiWithoutUser
|
CompileController.getFileFromClsiWithoutUser
|
||||||
|
|
||||||
|
webRouter.get '/teams', (req, res, next) ->
|
||||||
|
# Match v1 behaviour - if the user is signed in, show their teams list
|
||||||
|
# Otherwise show some information about teams
|
||||||
|
if AuthenticationController.isUserLoggedIn(req)
|
||||||
|
res.redirect('/user/subscription')
|
||||||
|
else
|
||||||
|
res.redirect("#{settings.v1Api.host}/teams")
|
||||||
|
|
||||||
#Admin Stuff
|
#Admin Stuff
|
||||||
webRouter.get '/admin', AuthorizationMiddlewear.ensureUserIsSiteAdmin, AdminController.index
|
webRouter.get '/admin', AuthorizationMiddlewear.ensureUserIsSiteAdmin, AdminController.index
|
||||||
webRouter.get '/admin/user', AuthorizationMiddlewear.ensureUserIsSiteAdmin, (req, res)-> res.redirect("/admin/register") #this gets removed by admin-panel addon
|
webRouter.get '/admin/user', AuthorizationMiddlewear.ensureUserIsSiteAdmin, (req, res)-> res.redirect("/admin/register") #this gets removed by admin-panel addon
|
||||||
|
|
Loading…
Reference in a new issue