---
title: Build authorized navigation context
summary: Loads the set of menu items a given user is authorized to see via the BOF Menu subsystem.
status: draft
owner: SAIF Documentation Team
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Core.Infragistics103
reference_type: package
operation_id: OP-NC-001
trigger: Application code constructs New NavigationContext(user)
---

# Build authorized navigation context

This operation constructs a `NavigationContext` instance for a given user and populates it with the set of menu items that user is authorized to see, by delegating to the BOF Menu subsystem.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-NC-001 |
| **Trigger** | Application code constructs `New NavigationContext(user)` (caller not present in this project — presumably app-level Global/Controller code in a consuming application)* |
| **Inputs** | User identifier string |
| **Outputs** | A populated `NavigationContext` instance with `MenuAuthorizedItems` |
| **Primary components** | `NavigationContext.New(inUser As String)` |
| **Entry point** | `SAIF.Presentation.Web.Core.Infragistics103\NavigationContext.vb` |

## Steps

1. Reads `MENU_ENVIRONMENT` from `System.Configuration.ConfigurationManager.AppSettings` and constructs `New clsMSOracleDataLayer("MENU", <MENU_ENVIRONMENT value>)` — an Oracle BOF data-layer instance scoped to a hardcoded `MENU` DB account.
2. Obtains an `IDataPortalInfo` from the data layer (`m_DAL.DataPortalInfo()`).
3. Delegates to `clsMenuAuthorizedItemCollection.GetMenuAuthorizedItems(DPI, inUser.Trim.ToUpper)` (defined in `SAIF.Business.Menu`, a local project reference — traced no further since it is out of scope for this library) to load the set of menu items the user is authorized for. Enforces [BR-NC-001](../business-rules.md#br-nc-001-menu-visibility-is-restricted-to-authorized-items) at the delegated-callee level.
   - On failure: no explicit error handling is present; a data-layer or business-menu collection failure propagates as an unhandled exception.
4. Assigns the result to the `MenuAuthorizedItems` property for later lookups by `GetItem`, `GetCurrentItem`, `GetCurrentPage`, and `IsMenuItem`.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([New NavigationContext user]) --> S1[Read MENU_ENVIRONMENT app setting]
	S1 --> S2[Construct clsMSOracleDataLayer MENU user]
	S2 --> S3[Obtain IDataPortalInfo]
	S3 --> S4[GetMenuAuthorizedItems via SAIF.Business.Menu]
	S4 --> S5[Assign MenuAuthorizedItems property]
	S5 --> EndOk([NavigationContext ready])
```

## Failure and edge-case behavior
- No branch/error handling is visible in the constructor itself; failures would surface as exceptions from the data layer or business-menu collection (unhandled here).

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Configuration settings](../configuration.md)
- [API reference](../api/index.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- SAIF.Presentation.Web.Core.Infragistics103\NavigationContext.vb
