SAIF.Business.Menu operations and processes¶
This page is the operation catalog and cross-operation hub for SAIF.Business.Menu. The library implements ten operations: one authorization-resolution operation (the core of the menu system), three in-memory navigation lookups, application/category code loading, the shared create/update/delete lifecycle for maintenance objects, and loading a user's favorites, group memberships, and item-level security grants. Each operation's detailed, step-by-step logic lives in its own page under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Resolve a user's authorized menu items | Resolve the complete set of menu items a specific user may reach, combining group-granted items, unsecured items, and the user's own favorites. | NavigationContext.New(user) — once per web session |
IDataPortalInfo, menu user ID |
Populated clsMenuAuthorizedItemCollection |
BR-MENU-001, BR-MENU-002, BR-MENU-004, BR-MENU-005 | MENU_ITEM, MENU_SECURITY, MENU_SECURITY_USER, MENU_PAGE, BUSONLINE_APPS_CODE, MENU_CATEGORY_CODE, MENU_FAVORITE | SQL-015, SQL-016 |
| Check whether a page is authorized | Answer whether a requested page is authorized for the current user by testing membership in the resolved authorized-item set. | clsControllerBase.RedirectUnauthorizedUsers on every web request, via NavigationContext.IsMenuItem |
Application code, requested page link | The matching clsMenuAuthorizedItem, or Nothing (denial) |
BR-MENU-008, BR-MENU-009 | — | — |
| Locate a menu item for navigation | Locate a menu item within a category for navigation rendering, trying an exact link match before a query-string-insensitive fallback. | Menu/navigation rendering (category-scoped lookup) | Category code, page link, optional visible-only flag | The matching clsMenuAuthorizedItem, or Nothing |
BR-MENU-009, BR-MENU-010, BR-MENU-011 | — | — |
| Resolve an application by virtual path | Resolve the application code that owns the current request's virtual path. | NavigationContext resolving the current application |
Requested virtual path | The matching clsApplicationCode, or Nothing |
BR-MENU-012 | BUSONLINE_APPS_CODE | — |
| Load application codes | Load application codes for administration or lookup, optionally restricted to active-only codes. | Caller requests GetAllApplicationCodes or GetActiveApplicationCodes |
IDataPortalInfo, active-only flag |
Populated clsApplicationCodeCollection |
BR-MENU-013 | BUSONLINE_APPS_CODE | SQL-013, SQL-014 |
| Create a menu item | Create a new menu item (representative of the create pattern shared by every maintenance object in this library). | Administration code calls clsMenuItem.NewMenuItem(dpi) then Save() |
Item properties, DataPortalInfo.UserID |
New MENU_ITEM row with a server-assigned sequence number |
BR-MENU-014, BR-MENU-016, BR-MENU-017, BR-MENU-018, BR-MENU-019, BR-MENU-020, BR-MENU-021 | MENU_ITEM, MENU_SECURITY | SQL-002, SQL-008, SQL-010 |
| Update or delete a maintained object | Update or delete an existing maintenance object, verifying that exactly one row was affected. | Caller calls Save() on a dirty existing object, or Delete() |
Object properties (update) or key (delete), DataPortalInfo.UserID |
Updated/deleted row; object returned to "new" state after delete | BR-MENU-016, BR-MENU-020, BR-MENU-022 | MENU_ITEM, MENU_PAGE, MENU_SECURITY, MENU_SECURITY_USER, MENU_FAVORITE, BUSONLINE_APPS_CODE, MENU_CATEGORY_CODE | SQL-034, SQL-041 |
| Load a user's favorites | Load the favorite menu items recorded for one user (or all users when no user is supplied). | Caller requests GetMenuFavoritesForUser |
IDataPortalInfo, user ID |
Populated clsMenuFavoriteCollection |
BR-MENU-001 | MENU_FAVORITE | SQL-020, SQL-021 |
| Load a user's group memberships | Load the security-group memberships recorded for one user (or all memberships when no user is supplied). | Caller requests GetMenuSecurityUserForUser |
IDataPortalInfo, menu user ID |
Populated clsMenuSecurityUserCollection |
BR-MENU-001 | MENU_SECURITY_USER | SQL-029, SQL-030 |
| Load security grants for an item | Load the security grants recorded for one menu item (or all grants when no item is supplied); this is the lazily-loaded SecurityGroups child of clsMenuItem. |
First access of clsMenuItem.SecurityGroups, or a direct call to GetMenuSecuritiesForItem |
IDataPortalInfo, menu item sequence number |
Populated clsMenuSecurityCollection |
BR-MENU-001 | MENU_SECURITY | SQL-027, SQL-028 |
Process flow diagram¶
The following diagram visualizes the primary operational flow: resolving a user's authorized menu items and using that set to gate navigation.
flowchart TD
Start([Web session starts]) --> Resolve[Resolve authorized menu items<br>op-menu-01]
Resolve --> Cache[Cache collection in web session]
Cache --> Request([Subsequent page request])
Request --> Check{Check page authorization<br>op-menu-02}
Check -->|Found| Allow([Render page / menu])
Check -->|Not found| Deny([Redirect unauthorized user])
Request --> Locate[Locate menu item for navigation<br>op-menu-03]
Locate --> Allow
Inherited operations and processes¶
No inherited operations were identified for this library. SAIF.Framework supplies the generic BOF lifecycle (Before*/After*, data portal dispatch) that every business object and collection here overrides with its own SQL and logic; the framework contributes infrastructure, not a distinct named operation consumed unchanged by this library.
Database interactions¶
The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under operations/.
| Operation | SQL | Tables | Type |
|---|---|---|---|
| Resolve a user's authorized menu items | SQL-015, SQL-016 | MENU_ITEM, MENU_SECURITY, MENU_SECURITY_USER, MENU_PAGE, BUSONLINE_APPS_CODE, MENU_CATEGORY_CODE, MENU_FAVORITE | Read |
| Resolve an application by virtual path | — | BUSONLINE_APPS_CODE | Read (in-memory over a previously loaded collection) |
| Load application codes | SQL-013, SQL-014 | BUSONLINE_APPS_CODE | Read |
| Create a menu item | SQL-002, SQL-008, SQL-010 | MENU_ITEM, MENU_SECURITY | Write |
| Update or delete a maintained object | SQL-034, SQL-041 | MENU_ITEM, MENU_PAGE, MENU_SECURITY, MENU_SECURITY_USER, MENU_FAVORITE, BUSONLINE_APPS_CODE, MENU_CATEGORY_CODE | Write |
| Load a user's favorites | SQL-020, SQL-021 | MENU_FAVORITE | Read |
| Load a user's group memberships | SQL-029, SQL-030 | MENU_SECURITY_USER | Read |
| Load security grants for an item | SQL-027, SQL-028 | MENU_SECURITY | Read |
Failure and edge-case behavior¶
- A missing or renamed column in the authorized-item reader surfaces as a runtime error from
AfterRetrieve(see Resolve a user's authorized menu items).* GetMenuSecurityUserForUseris affected by an inverted-branch defect: the parameterized statement is issued without its bind variable while the unfiltered statement receives a superfluous one; the user-scoped path is expected to fail at execution (see Load a user's group memberships).*- Every create/update/delete verifies exactly one row was affected and adds an error message instead of throwing when that check fails (see Update or delete a maintained object).
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Business rules
- Database tables
- SQL catalog
- Security and authorization
- API reference
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/clsMenuAuthorizedItemCollection.vb
- SAIF.Business.Menu/clsMenuItem.vb
- SAIF.Business.Menu/clsApplicationCodeCollection.vb
- SAIF.Business.Menu/clsMenuFavoriteCollection.vb
- SAIF.Business.Menu/clsMenuSecurityUserCollection.vb
- SAIF.Business.Menu/clsMenuSecurityCollection.vb