forked from wangziqi/gongxue-base
fix: tighten H5 portal guard and legacy home stats
This commit is contained in:
@@ -25,6 +25,18 @@
|
||||
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent('/'));
|
||||
return;
|
||||
}
|
||||
if (portal === 'student' && path.indexOf('/pages/') === 0 && path.indexOf('/pages/student/') !== 0 && path.indexOf('/pages/bootstrap/') !== 0) {
|
||||
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent('/pages/student/home/index'));
|
||||
return;
|
||||
}
|
||||
if (portal === 'tenant-admin' && path.indexOf('/pages/') === 0 && path.indexOf('/pages/tenant-admin/') !== 0 && path.indexOf('/pages/bootstrap/') !== 0 && path.indexOf('/pages/student/login/') !== 0) {
|
||||
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent('/pages/tenant-admin/workbench/index'));
|
||||
return;
|
||||
}
|
||||
if (portal === 'platform-admin' && path.indexOf('/pages/') === 0 && path.indexOf('/pages/platform-admin/') !== 0 && path.indexOf('/pages/bootstrap/') !== 0 && path.indexOf('/pages/student/login/') !== 0) {
|
||||
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent('/pages/platform-admin/workbench/index'));
|
||||
return;
|
||||
}
|
||||
if (path.indexOf('/pages/student/') === 0 && !publicStudentPaths[path]) {
|
||||
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent(redirect));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user