Acquire navigation data¶
Obtain the signed-in user's authorised menu items, loading them once per session. This operation is implemented by SAIFMenu.GetNavigationData / SAIFMenuTop.GetNavigationData.
| Field | Value |
|---|---|
| Operation ID | OP-MENU-001 |
| Trigger | First access to NavigationData in a control's page lifecycle within a given ASP.NET session. |
| Inputs | Windows logon identity (Request.LogonUserIdentity.Name); Session("navdata"). |
| Outputs | A NavigationContext holding the user's authorised menu items, cached in session. |
| Primary components | SAIFMenu.GetNavigationData / SAIFMenuTop.GetNavigationData |
| Entry point | SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb |
Steps¶
- If the control is in design mode, return
Nothingwithout touching session or the database. Enforces BR-MENU-001. - If
Session("navdata")holds aNavigationContext, return it. Enforces BR-MENU-002. - Otherwise read
HttpContext.Current.Request.LogonUserIdentity.Name, strip the domain prefix, trim and upper-case it. Enforces BR-MENU-003. - Construct
New NavigationContext(userid)and store it inSession("navdata"). Enforces BR-MENU-004. - Delegates to
NavigationContextinSAIF.Presentation.Web.MVC, whose constructor opens an Oracle data layer as DB userMENUand loads the user's authorised menu items — this happens inside that component, not here.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["First access to NavigationData in a control's page life cycle"]) --> Design{Design mode?}
Design -->|Yes| Nothing(["Return Nothing"])
Design -->|No| Cached{"Session("navdata") cached?"}
Cached -->|Yes| ReturnCached(["Return cached NavigationContext"])
Cached -->|No| Identity["Read LogonUserIdentity, strip domain, trim/upper-case"]
Identity --> Construct["New NavigationContext(userid)"]
Construct --> Store["Store in Session("navdata")"]
Store --> End(["NavigationContext with authorised items"])
Failure and edge-case behavior¶
- Design mode: no data acquired, no exception (BR-MENU-001).
- No cached session data and identity not
DOMAIN\userform:useridis derived directly fromLogonUserIdentity.Name, which is not validated for format here.
Related documentation¶
Sources¶
SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb