Bypass app password for site admins

This commit is contained in:
seo committed 2026-06-12 15:45:02 +09:00
1 parent baeccf9d58
commit 70d207f807
2 files changed
+7 -1

No files matched your search

+5
View File
@@ -76,6 +76,11 @@ async function hasAdminSession() {
async function requireAccess(nextAction) {
try {
if (await hasAdminSession()) {
nextAction && nextAction();
return;
}
const session = await fetch(`${apiUrl}?session=1`, { credentials: 'same-origin' }).then(res => res.json());
if (session.authenticated) {
nextAction && nextAction();