Skip to content

Commit 038c39a

Browse files
author
AhmadMWaddah
committed
Fix: Reports nav hidden for users without permissions
Reports section now uses _has_module_access(engine, reporting) check like other modules
1 parent 205d182 commit 038c39a

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

core/context_processors.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -335,23 +335,23 @@ def _build_nav_hierarchy(engine):
335335
nav.append(audit_section)
336336

337337
# Reporting section - standalone section
338-
# Show for authenticated users (Phase 8 feature)
339-
# Will show for any authenticated user with appropriate permissions
340-
reporting_section = {
341-
"title": "Reports",
342-
"icon": "bar-chart",
343-
"url": "",
344-
"app": "reporting",
345-
"children": [
346-
{
347-
"title": "Reports",
348-
"icon": "bar-chart",
349-
"url": "Reporting:list",
350-
"app": "reporting",
351-
"children": [],
352-
},
353-
],
354-
}
355-
nav.append(reporting_section)
338+
# Only show for users with reporting permissions (Phase 8 feature)
339+
if _has_module_access(engine, "reporting"):
340+
reporting_section = {
341+
"title": "Reports",
342+
"icon": "bar-chart",
343+
"url": "",
344+
"app": "reporting",
345+
"children": [
346+
{
347+
"title": "Reports",
348+
"icon": "bar-chart",
349+
"url": "Reporting:list",
350+
"app": "reporting",
351+
"children": [],
352+
},
353+
],
354+
}
355+
nav.append(reporting_section)
356356

357357
return nav

0 commit comments

Comments
 (0)