Skip to content

Resolve an application by virtual path

Resolves the application code that owns the current request's virtual path; the returned code is used as the application context for all subsequent authorization lookups in the session.

Field Value
Operation ID OP-MENU-04
Trigger NavigationContext resolving the current application from the request's virtual path
Inputs Requested virtual path
Outputs The matching clsApplicationCode, or Nothing
Primary components clsApplicationCodeCollection.ItemByAppPath
Entry point SAIF.Business.Menu/clsApplicationCodeCollection.vb

Steps

  1. Filter the collection where ApplicationPath.Trim.ToUpper equals the supplied path upper-cased and trimmed. (BR-MENU-012; table BUSONLINE_APPS_CODE)
  2. Return the first match or Nothing.
  3. If a match is found: callers (the MVC NavigationContext) use the returned Code as the application code for all subsequent authorization lookups.
  4. If no match: navigation context resolution fails for the request.

Process flow

flowchart TD
    Start([Request virtual path]) --> Filter[Filter ApplicationCodeCollection by trimmed, upper-cased path]
    Filter --> Found{Match found?}
    Found -->|Yes| Return([Return application Code])
    Found -->|No| Nothing([Return Nothing])

Failure and edge-case behavior

  • No matching application path: Nothing is returned and the caller cannot establish an application context for the request.

Sources

  • SAIF.Business.Menu/clsApplicationCodeCollection.vb