mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-02 08:31:35 +00:00
fix(frontend): show security audit menu in simple mode
The security audit group (Risk Control + Prompt Audit) was hidden from the sidebar via `hideInSimpleMode`, but nothing else in the stack restricts it in simple mode: - `router/index.ts` simple-mode `restrictedPaths` does not cover `/admin/risk-control` or `/admin/prompt-audit` - the `/risk-control` and `/prompt-audit` admin route groups have no `RunMode` gate, and neither does `internal/securityaudit/` nor `service/content_moderation.go` - `SettingsView.vue` renders the risk control toggle together with a `<router-link to="/admin/risk-control">` shortcut, and the settings page stays visible in simple mode The feature is therefore fully usable in simple mode and already reachable through the settings page — only the sidebar entry was missing. Drop the flag so the menu matches actual behaviour. The group remains gated by `risk_control_enabled` (opt-in, default false) through `featureFlag: flagRiskControl`.
This commit is contained in:
@@ -775,7 +775,6 @@ const adminNavItems = computed((): NavItem[] => {
|
||||
path: '/admin/security-audit',
|
||||
label: t('nav.securityAudit'),
|
||||
icon: ShieldIcon,
|
||||
hideInSimpleMode: true,
|
||||
expandOnly: true,
|
||||
featureFlag: flagRiskControl,
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user