diff --git a/frontend/Web/passwd.html b/frontend/Web/passwd.html
index ada0800..848e864 100644
--- a/frontend/Web/passwd.html
+++ b/frontend/Web/passwd.html
@@ -172,7 +172,6 @@
Login
Logout
-
Close Session
Register
Change Password
Admin Panel
@@ -240,6 +239,12 @@
}
document.addEventListener('SessionReady', async () => {
await UpdateUserInfo();
+ if((await GetMyPrivilege())<1)
+ {
+ document.querySelector('.passwd-box').style.display = 'none';
+ document.querySelector('.content').innerHTML = '
Please log in first.
Redirecting to home page in 3 seconds...
';
+ setTimeout(function(){window.location.href="/";},3000);
+ }
});
async function TryPasswd()
{
@@ -260,14 +265,6 @@
setTimeout(function(){window.location.href="/";},3000);
}
}
- (async () => {
- if((await GetMyPrivilege())<1)
- {
- document.querySelector('.passwd-box').style.display = 'none';
- document.querySelector('.content').innerHTML = '
Please log in first.
Redirecting to home page in 3 seconds...
';
- setTimeout(function(){window.location.href="/";},3000);
- }
- })();