feat(assets): add dimension analysis and authorized user previews
ci/woodpecker/push/woodpecker Pipeline was successful

Refactor asset drilldowns with combined dimension filters, parent summaries and progressive loading. Add the hidden /who read-only permission preview with scoped authorization, identity mapping and audit logging. Refine inventory counts and AI问数 presentation.
This commit is contained in:
shishengliang
2026-09-28 12:29:51 +08:00
parent 6de77adb47
commit f1b3f8d3da
69 changed files with 3871 additions and 536 deletions
+7
View File
@@ -34,3 +34,10 @@ export function canAccessEnergy(roles: readonly string[] | null | undefined): bo
if (!roles || roles.length === 0) return false;
return roles.some(r => ENERGY_ACCESS_ROLES.includes(r) || r === ENERGY_FULL_ACCESS);
}
/** Shared by normal login and permission preview; full access wins over department. */
export function resolvePermissionLevel(roles: readonly string[]): 'full' | 'department' | 'personal' {
if (roles.some(role => FULL_ACCESS_ROLES.includes(role))) return 'full';
if (roles.some(role => DEPT_ACCESS_ROLES.includes(role))) return 'department';
return 'personal';
}