Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CspmIT/mas-agua-front/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Security module manages user accounts and access control for the Mas Agua platform. Administrators can:- View all user accounts
- Edit user credentials
- Manage user profiles and permissions
- Control account status (enabled/disabled)
Accessing Security Settings
Navigate to Configuration > Seguridad to manage user accounts.User Profiles
Mas Agua supports four user profile levels:Super Admin
Full system access and configuration control
Moderador
Moderation and advanced user permissions
Operador
Operational access for day-to-day tasks
Lector
Read-only access to dashboards and reports
User Table
The user management interface displays:| Column | Description |
|---|---|
| Nombre | Full name (first_name + last_name) |
| User email address | |
| Perfil | User profile (role) |
| Contraseña | Password (hidden by default, toggle to view) |
| Estado | Account status (Habilitado/Deshabilitado) |
| Actions | Edit button |
Profile Mapping
Fromsrc/modules/configSecurity/utils/DataTable/ColumnsUsers.jsx:6:
Viewing User Details
Password Visibility
Click the visibility toggle icon to show/hide passwords:- Hidden:
•••••••• - Visible: Actual password text
User Status
User status is indicated by:- Green circle + “Habilitado”: Active user account
- Red circle + “Deshabilitado”: Disabled user account
status > 0: Enabledstatus = 0: Disabled
Editing Users
Edit Form Opens in New Tab
A new tab opens with the user edit form showing:
- User name (read-only)
- Password field (editable)
Modify Password
Enter the new password in the text field.
User password (minimum validation required)
User Data Structure
Fromsrc/modules/configSecurity/utils/DataTable/dataUser.js:
Example User Configuration
- User: Juan Rodriguez
- Email: juan.rodriguez@masagua.com
- Role: Operador (profile 4)
- Status: Enabled (status 1)
Filtered User Display
Fromsrc/modules/configSecurity/views/index.jsx:42:
Super Admin users (id_profile = 1) are hidden from the user management table.
Tab-Based Editing
The user editing system uses a tab-based interface:Tab Creation
Tab Behavior
- Clicking Edit opens a new tab
- If tab already exists for that user, it switches to existing tab
- Saving closes the tab and returns to user list
- Multiple user edit tabs can be open simultaneously
API Integration
The current implementation shows a success message but doesn’t make actual API calls (see
src/modules/configSecurity/components/EditUserRecloser/EditUserRecloser.jsx:31).In production, you would implement:Security Considerations
Recommended Improvements
Password Hashing
Password Hashing
Implement bcrypt or similar hashing:Store only hashed passwords in database.
Password Complexity
Password Complexity
Enforce password requirements:
- Minimum 8 characters
- At least one uppercase letter
- At least one number
- At least one special character
Remove Password Display
Remove Password Display
Never show actual passwords:
- Remove visibility toggle
- Show only ”********” in table
- Provide “Reset Password” instead of “Edit Password”
Audit Logging
Audit Logging
Track all user management actions:
Permission Matrix
| Action | Super Admin | Moderador | Operador | Lector |
|---|---|---|---|---|
| View users | ✓ | ✓ | ✗ | ✗ |
| Edit users | ✓ | ✓ | ✗ | ✗ |
| Create users | ✓ | ✗ | ✗ | ✗ |
| Delete users | ✓ | ✗ | ✗ | ✗ |
| View dashboards | ✓ | ✓ | ✓ | ✓ |
| Edit dashboards | ✓ | ✓ | ✓ | ✗ |
| Configure alarms | ✓ | ✓ | ✗ | ✗ |
| Configure PLCs | ✓ | ✗ | ✗ | ✗ |
The exact permission matrix depends on implementation. The table above shows typical role-based access patterns.
Best Practices
User Account Management
- Review user accounts regularly
- Disable accounts for inactive users
- Use principle of least privilege (assign minimum required profile)
- Audit password changes
- Implement password rotation policy
Profile Assignment
- Lector: For stakeholders needing read-only access
- Operador: For operators managing day-to-day operations
- Moderador: For team leads and senior operators
- Super Admin: For IT administrators only
Troubleshooting
Cannot See Super Admin Users
Cannot See Super Admin Users
This is by design. Super Admin users (id_profile = 1) are filtered from the display for security.
Edit Tab Won't Close
Edit Tab Won't Close
Use the tab close button or save the form. The tab should auto-close on successful save.
Changes Not Persisting
Changes Not Persisting
Currently, changes may not persist to backend. Check if API integration is implemented in your environment.
Future Enhancements
User Creation Form
Add ability to create new users with:
- Email validation
- Profile selection
- Initial password generation
Two-Factor Authentication
Add 2FA for enhanced security:
- TOTP (Google Authenticator)
- SMS codes
- Email verification

