Commit 5639949
authored
hotfix: initiatives menu item not visible to users without UserManagement permission (#1088)
The "Initiatives" item in the Management section of the side navigation
was never visible to users who had the `Initiatives` permission but not
the `UserManagement` permission (e.g. CMPSM, CSO, CPM roles).
This was caused by conditional logic in `AsyncMenuService`. The
`menuItems.Add(management)` call, which adds the Management section to
the nav, was placed inside the `UserManagement` policy block. The
`Initiatives` policy check sat outside that block (at the`Internal`
level), but since the `management` object had never been added to
`menuItems`, any items appended to it were silently discarded.
## PR Type
- [ ] Feature
- [x] Hotfix
- [ ] Release
- [ ] Documentation
---
## Checklist
- [x] Code builds locally
- [x] Tests added or updated
- [x] CI is green
- [ ] Peer review completed
---
### UAT
- [x] Required → completed
- [ ] Not required (explain below)1 file changed
Lines changed: 5 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
| |||
137 | 136 | | |
138 | 137 | | |
139 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
| |||
0 commit comments