Navigation
SMAF uses a hierarchical, role-based navigation system that presents users with only the modules and features they have permission to access. This guide explains how the menu system works and how to navigate effectively.Main Menu Structure
The navigation menu is implemented as a TreeView control that displays a collapsible hierarchy of modules and features.TreeView Implementation
Home.aspx
Home.aspx.cs
The menu starts from the root level (parent = 0) and recursively builds the tree structure based on parent-child relationships in the database.
Module Organization
Modules are organized hierarchically with parent and child relationships:Data Structure
Each menu item contains:- PADRE (Parent): The parent module ID (“0” for root items)
- MODULO: Unique module identifier
- DESCRIPCION: Display name of the module
- URL: Target page for the module
- ROL: Required role to access the module
Menu Building Process
clsFuncionesGral.cs
How to Access Different Features
Navigating through SMAF modules is straightforward:Locate the Module
Find the desired module in the left-side TreeView menu. Modules may be nested under parent categories.
Expand Parent Categories
If the module is nested, click on the parent category to expand and reveal child modules.
System Validates Access
The system verifies you have permission to access the selected module based on your role.
Selection Handler
When you select a menu item, the following process occurs:Home.aspx.cs
Role-Based Menu Visibility
SMAF implements sophisticated role-based access control (RBAC) to ensure users only see modules they’re authorized to use.How Roles Work
-
Role Assignment: When you log in, your role is stored in the session:
-
Role-Based Filtering: The menu generation queries the database with your role:
- Dynamic Display: Only modules matching your role are added to the TreeView
URL Access Control
Even if you know a module’s URL, the system validates your role before granting access:MngNegocioMenu.cs
Different roles may have completely different menu structures. An administrator will see more options than a standard user.
Common User Roles
While specific roles vary by organization, SMAF recognizes several role types referenced in the code:| Role | Description | Typical Access |
|---|---|---|
| ADMINISTRADOR | System administrator | Full access to all modules |
| INVESTIGADOR | Researcher | Access to expense submission and tracking |
| JEFE_CENTRO | Center chief | Approval authority for their center |
| DIRECTOR_ADJUNTO | Deputy director | Regional approval authority |
| SUBDIRECTOR_ADJUNTO | Assistant deputy director | Departmental oversight |
| JEFE_DEPARTAMENTO | Department head | Department-level access |
| ENLACE | Liaison/Coordinator | Limited coordination access |
| DIRECTOR_GRAL | General director | High-level approval authority |
| DIRECTOR_ADMINISTRACION | Administration director | Financial oversight |
| DIRECTOR_JURIDICO | Legal director | Legal review access |
Menu Types
SMAF supports multiple menu types for different contexts:Standard Menu (“Menu”)
The default navigation menu showing available modules:Budget Items Menu (“Partidas”)
Specialized menu for selecting budget line items:Navigation Best Practices
Explore Your Menu
Familiarize yourself with all available modules in your menu to maximize efficiency
Use Breadcrumbs
Keep track of your location within the application hierarchy
Bookmark Common Pages
Use browser bookmarks for frequently accessed modules (after logging in)
Respect Access Restrictions
Don’t attempt to access modules outside your role - all access is logged
Troubleshooting Navigation Issues
Menu Not Loading
If your menu appears empty:- Check your session: Your session may have expired. Refresh the page or log in again.
- Verify your role: Contact your administrator to confirm your role is properly assigned.
- Clear cache: Try clearing your browser cache and logging in again.
Cannot Access a Module
If clicking a menu item does nothing:- Parent category: You may have clicked a parent category without a URL. Try expanding it to see child modules.
- Role restriction: The module may require a different role. Contact your administrator.
- Maintenance: The module may be temporarily unavailable. Check with IT support.
Session Timeout During Navigation
If you’re redirected to the login page:Multi-Application Support
While primarily used for SMAF, the navigation system supports multiple applications:clsFuncionesGral.cs
The same navigation framework can be reused for related applications with different menu structures.
Technical Implementation
Menu Data Flow
Source Code References
- Menu Building:
clsFuncionesGral.cs:739-814 - Menu Data Layer:
MngNegocioMenu.cs - Navigation Handler:
Home.aspx.cs:110-144 - TreeView Control:
Home.aspx:55-58 - Role Validation:
clsFuncionesGral.cs:974-1132