mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Clear legacy admin defaults and trust adapter state
This commit is contained in:
1 parent
66595edaf6
commit
c6c297e16b
3 files changed
+14
-51
No files matched your search
+2
-12
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user