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 pattern | Page/component | Audience | Nav source | Feature/permission gate | Route-guard behaviour | Gateway/compat classification | Source path |
|---|---|---|---|---|---|---|---|
/hr-operations/assets | HrOperationsAssetsPage (asset tab) | Admin / manager | AppLayout nav id asset-requests, group Workforce | moduleFeature hr-operations AND one of its permissions (includes hr-operations) | Longest-prefix /hr-operations rule enforced; super-admin roles redirected out | Compatibility (monolith-shaped) | UI/salary-ui/apps/client-hrms-portal/src/App.tsx |
/assets | EssAssetsPage | Employee | AppLayout nav id ess-assets, group Self Service | Nav gated by Asset.ViewSelf (and hr-operations); route has no routeFeatures entry | Authenticated-only at route level; super-admin roles redirected out | Compatibility (monolith-shaped) | UI/salary-ui/apps/client-hrms-portal/src/App.tsx |
Legacy hash asset | Redirect target | Admin | n/a | n/a | Redirects to /hr-operations/assets | n/a | UI/salary-ui/apps/client-hrms-portal/src/App.tsx |
Navigation items
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.
Navigation structure
Source References
UI/salary-ui/apps/client-hrms-portal/src/App.tsxUI/salary-ui/apps/client-hrms-portal/src/components/AppLayout.tsxUI/salary-ui/apps/client-hrms-portal/src/utils/ProtectedRoute.tsx
Related Articles
See Also
Keywords
asset routes, navigation, route guard, protected route, legacy redirect
Revision Information
- Status: Draft
- Last reviewed: 2026-07-17
- Review cycle: Quarterly