docs: update hoover.md, audit residual storage reads, verify
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user