Skip to content

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

  1. If the control is in design mode, return Nothing without touching session or the database. Enforces BR-MENU-001.
  2. If Session("navdata") holds a NavigationContext, return it. Enforces BR-MENU-002.
  3. Otherwise read HttpContext.Current.Request.LogonUserIdentity.Name, strip the domain prefix, trim and upper-case it. Enforces BR-MENU-003.
  4. Construct New NavigationContext(userid) and store it in Session("navdata"). Enforces BR-MENU-004.
  5. Delegates to NavigationContext in SAIF.Presentation.Web.MVC, whose constructor opens an Oracle data layer as DB user MENU and 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\user form: userid is derived directly from LogonUserIdentity.Name, which is not validated for format here.

Sources

  • SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb