mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-22 02:04:31 +00:00
Merge pull request #2921 from overleaf/jel-admin-redirect-after-login
Redirect after login for admin pages GitOrigin-RevId: 3cd99796cd38298a866444fc7d58317935e13817
This commit is contained in:
parent
bfe06015c8
commit
7d0b3f5cd1
1 changed files with 3 additions and 1 deletions
|
@ -261,7 +261,9 @@ module.exports = AuthorizationMiddleware = {
|
|||
|
||||
redirectToRestricted(req, res, next) {
|
||||
// TODO: move this to throwing ForbiddenError
|
||||
res.redirect(`/restricted?from=${encodeURIComponent(req.url)}`)
|
||||
res.redirect(
|
||||
`/restricted?from=${encodeURIComponent(res.locals.currentUrl)}`
|
||||
)
|
||||
},
|
||||
|
||||
restricted(req, res, next) {
|
||||
|
|
Loading…
Reference in a new issue