DS-1447 Login as User redirecting to wrong page

This commit is contained in:
Ivan Masár
2014-11-13 10:51:18 +01:00
parent c93a50cfcb
commit f7e6377b01

View File

@@ -813,7 +813,12 @@ function doEditEPerson(epersonID)
// the user is loged in as another user, we can't let them continue on
// using this flow because they might not have permissions. So forward
// them to the homepage.
cocoon.redirectTo(cocoon.request.getContextPath(),true);
var siteRoot = cocoon.request.getContextPath();
if (siteRoot == "")
{
siteRoot = "/";
}
cocoon.redirectTo(siteRoot,true);
getDSContext().complete();
cocoon.exit();
}