Bypass app password for site admins
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user