Load a user's group memberships¶
Loads the security-group memberships recorded for one user, or all memberships when no user is supplied. This operation carries a known inverted-branch defect in its parameter binding.
| Field | Value |
|---|---|
| Operation ID | OP-MENU-09 |
| Trigger | Caller requests GetMenuSecurityUserForUser |
| Inputs | IDataPortalInfo, menu user ID |
| Outputs | Populated clsMenuSecurityUserCollection |
| Primary components | clsMenuSecurityUserCollection.GetMenuSecurityUserForUser |
| Entry point | SAIF.Business.Menu/clsMenuSecurityUserCollection.vb |
Steps¶
- Build
Criteria(dpi, menuUser). BeforeRetrieve: whenMenuUseris non-empty it selectsretrieveForUserSQL(SQL-030,WHERE MENU_USER = :MenuUser) — but theAddParm("MenuUser", …)call sits in theElsebranch, so the parameterized statement is issued without its bind variable while the unfiltered statement (SQL-029) receives a superfluous parameter. (BR-MENU-001; table MENU_SECURITY_USER)- On failure: this inverted-branch defect means the user-scoped path is expected to fail at execution (missing bind variable for
:MenuUser).* AfterRetrieveloads oneclsMenuSecurityUserper row.
Process flow¶
flowchart TD
Start([GetMenuSecurityUserForUser]) --> Choice{MenuUser supplied?}
Choice -->|Yes| ByUser[retrieveForUserSQL selected, but AddParm MenuUser is NOT called]
Choice -->|No| All[Unfiltered statement selected, AddParm MenuUser called anyway]
ByUser --> Exec1([Execution likely fails: missing bind variable])
All --> Load[AfterRetrieve: Load each clsMenuSecurityUser]
Load --> Done([Return populated collection])
Failure and edge-case behavior¶
- User-scoped retrieval (
MenuUsersupplied): the parameterized SQL is issued without its bind variable — this is expected to fail at execution rather than return a filtered result.* - Unfiltered retrieval (
MenuUserempty): a strayAddParm("MenuUser", …)call executes against a statement with no matching bind placeholder; behavior in that case is unconfirmed.**
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
- SAIF.Business.Menu/clsMenuSecurityUserCollection.vb