docs: update hoover.md, audit residual storage reads, verify

This commit is contained in:
2026-08-15 08:25:40 +00:00
parent 4f74192302
commit 1980043afd
2 changed files with 82 additions and 5 deletions
+3 -3
View File
@@ -5,7 +5,7 @@
* Requires auth: rw permission.
*/
import { h, definePage, reactive, html, PageHeader, Table, Badge, ConfirmDelete, openModal, closeModal, formModal, apiFetch, toast, esc } from '/static/hoover/index.js';
import { h, definePage, reactive, html, PageHeader, Table, Badge, ConfirmDelete, openModal, closeModal, formModal, apiFetch, toast, esc, getAuthData } from '/static/hoover/index.js';
const BUILTIN_ADMIN = 'admin';
@@ -22,12 +22,12 @@ const SUBSYSTEMS = [
];
function currentUser() {
const u = JSON.parse(sessionStorage.getItem('vw:user') || 'null');
const u = getAuthData()?.user;
return u ? u.username : '';
}
function hasAuthAdmin() {
const perms = JSON.parse(sessionStorage.getItem('vw:permissions') || 'null');
const perms = getAuthData()?.permissions;
return perms && perms.auth === 'rw';
}