Clear legacy admin defaults and trust adapter state

This commit is contained in:
thePR0M3TH3AN committed 2025-09-28 19:21:51 -04:00
1 parent 66595edaf6
commit c6c297e16b
3 files changed
+14 -51

No files matched your search

+2 -12
View File
@@ -7,10 +7,6 @@ import {
setWhitelistMode as persistWhitelistMode,
ADMIN_WHITELIST_MODE_STORAGE_KEY,
} from "./config.js";
import {
ADMIN_INITIAL_BLACKLIST,
ADMIN_INITIAL_WHITELIST,
} from "./lists.js";
import {
ADMIN_BLACKLIST_KEY,
ADMIN_EDITORS_KEY,
@@ -86,16 +82,10 @@ class AccessControl {
this.editors = new Set(
dedupeNpubs([...ADMIN_EDITORS_NPUBS, ...editors])
);
const normalizedWhitelist = dedupeNpubs([
...ADMIN_INITIAL_WHITELIST,
...whitelist,
]);
const normalizedWhitelist = dedupeNpubs(whitelist);
this.whitelist = new Set(normalizedWhitelist);
const blacklistDedupe = dedupeNpubs([
...ADMIN_INITIAL_BLACKLIST,
...blacklist,
]);
const blacklistDedupe = dedupeNpubs(blacklist);
const whitelistSet = new Set(normalizedWhitelist.map(normalizeNpub));
const adminGuardSet = new Set([
normalizeNpub(ADMIN_SUPER_NPUB),