Skip to main content

Asset Routes and Navigation

Summary

The asset UI exposes exactly two routes: an admin HR Operations asset tab and an employee self-service list. Both are protected pages. A legacy hash route redirects into the admin route. Navigation entries and route guards are defined separately, and the frontend guards are feature/visibility gates rather than backend authorization.

Audience

  • Developers wiring or verifying asset routing.
  • QA engineers validating navigation visibility and guards.
  • Support engineers explaining why a route is or is not visible.
  • Solution architects and security engineers reviewing gate semantics.

Reference Content

Route table

Route patternPage/componentAudienceNav sourceFeature/permission gateRoute-guard behaviourGateway/compat classificationSource path
/hr-operations/assetsHrOperationsAssetsPage (asset tab)Admin / managerAppLayout nav id asset-requests, group WorkforcemoduleFeature hr-operations AND one of its permissions (includes hr-operations)Longest-prefix /hr-operations rule enforced; super-admin roles redirected outCompatibility (monolith-shaped)UI/salary-ui/apps/client-hrms-portal/src/App.tsx
/assetsEssAssetsPageEmployeeAppLayout nav id ess-assets, group Self ServiceNav gated by Asset.ViewSelf (and hr-operations); route has no routeFeatures entryAuthenticated-only at route level; super-admin roles redirected outCompatibility (monolith-shaped)UI/salary-ui/apps/client-hrms-portal/src/App.tsx
Legacy hash assetRedirect targetAdminn/an/aRedirects to /hr-operations/assetsn/aUI/salary-ui/apps/client-hrms-portal/src/App.tsx

The admin navigation item (asset-requests) has title "Assets", path /hr-operations/assets, group "Workforce", icon ClipboardList, moduleFeature "hr-operations", permissions ["hr-operations"], roles ["hr-admin","it-asset-admin"], and audience admin/manager. The ESS navigation item (ess-assets) has title "Assets", path /assets, group "Self Service", permissions ["Asset.ViewSelf","hr-operations"], and audience employee. An it-asset-admin role exists and also appears on the Operations Dashboard navigation item.

Route-guard mechanics

ProtectedRoute performs a longest-prefix match over routeFeatures. The /hr-operations prefix rule requires moduleFeature hr-operations AND one of its permissions; /hr-operations/assets is governed by that rule. /assets has no routeFeatures entry, so it is authenticated-only at the route level, with its navigation visibility gated by Asset.ViewSelf. Super-admin roles are redirected out of these routes. These are frontend visibility and feature gates, not backend authorization.

Source References

  • UI/salary-ui/apps/client-hrms-portal/src/App.tsx
  • UI/salary-ui/apps/client-hrms-portal/src/components/AppLayout.tsx
  • UI/salary-ui/apps/client-hrms-portal/src/utils/ProtectedRoute.tsx

See Also

Keywords

asset routes, navigation, route guard, protected route, legacy redirect

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-17
  • Review cycle: Quarterly