mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 04:12:25 +00:00
fix(admin): exclude whitelisted users from blacklist in admin state and fix unit tests
- Modified `sanitizeAdminState` in `js/adminListStore.js` to ensure whitelisted users are automatically excluded from the blacklist. - Updated `tests/admin-list-store.test.mjs` to use `throw-community` failure mode in the mock pool, fixing a flaky test case that incorrectly assumed base lists would load when `throw-authors` was active. - Updated `tests/ui/tag-pill-list.test.mjs` to expect `#` prefixed tags, aligning with recent UI changes. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
ef7ae13756
commit
e993046d60
3 files changed
+17
-8
No files matched your search
@@ -202,6 +202,7 @@ function sanitizeAdminState(state = {}) {
|
||||
normalizeNpub(ADMIN_SUPER_NPUB),
|
||||
...ADMIN_EDITORS_NPUBS.map(normalizeNpub),
|
||||
...sanitizedEditors.map(normalizeNpub),
|
||||
...sanitizedWhitelist.map(normalizeNpub),
|
||||
]);
|
||||
|
||||
const sanitizedBlacklist = sanitizeNpubList(state.blacklist || []).filter(
|
||||
|
||||
Reference in new issue
Block a user