Skip to main content

Overview

User management is a critical admin function that allows you to control access, assign roles, and manage user status. This guide covers all aspects of user management in the platform.
Admin-Only Feature: User management requires the admin_completo permission. Only Administrators have access to this functionality.

Accessing User Management

Navigate to Admin Dashboard > Users to access the user management interface. The Users page displays:
  • Total user count
  • Search and filter options
  • Complete user table with actions
  • User statistics and activity

User Table Overview

The user table displays key information:
ColumnInformation Displayed
UsuarioProfile picture, full name, and email address
RolCurrent role badge with color coding
EstadoActive, Inactive, or Suspended status
Último AccesoDate of last login
EstadísticasPosts created, published, comments, views
AccionesQuick action buttons for user management

User Roles

The platform supports five distinct user roles, each with specific permissions:

Role Hierarchy

1

Administrador (Administrator)

Full platform access - Complete control over all features and users.Key Permissions:
  • Full admin access (admin_completo)
  • Manage all users
  • Change user roles
  • Publish posts immediately
  • Edit any content
  • Moderate all comments
  • Access all analytics
Role ID: 1
2

Editor

Content management focus - Can review, approve, and publish content.Key Permissions:
  • Publish posts (publicar_post)
  • Edit any post (editar_post_cualquiera)
  • Moderate comments
  • Approve/reject submissions
  • View content analytics
Cannot: Manage users or change rolesRole ID: 2
3

Autor (Author)

Content creation - Can write and manage own content.Key Permissions:
  • Create posts (crear_post)
  • Edit own posts (editar_post_propio)
  • Submit posts for approval
  • Manage own comments
Cannot: Publish directly (needs editor approval)Role ID: 3
4

Escritor (Writer)

Similar to Author with content creation focus.
This role maps to Author (ID: 3) in the backend.
5

Comentador (Commenter)

Basic access - Can only read and comment.Key Permissions:
  • View published posts
  • Write comments
  • Like content
  • Manage own profile
Cannot: Create posts or access admin areasRole ID: 4

Changing User Roles

Only administrators can change user roles. You cannot change your own role.

Step-by-Step Process

1

Locate the User

Use the search bar or filters to find the user whose role you want to change.Search by:
  • First name
  • Last name
  • Email address
Filter by:
  • Current role
  • User status
2

Open Role Change Modal

Click the shield icon (🛡️) in the Actions column for the user.A modal will appear showing:
  • User’s current information
  • Available roles
  • Role descriptions
3

Select New Role

Click on the desired role from the list:
  • Administrador
  • Editor
  • Autor
  • Comentador
The current role will be highlighted.
4

Confirm Change

The role change is applied immediately upon selection.
The user will see updated permissions on their next login or page refresh.

Managing User Status

User status controls account access and activity.

Status Types

Full access to the platform
  • Can log in normally
  • All permissions based on role are enabled
  • Appears as active in user lists
  • Badge: Green
Temporary disabled account
  • Cannot log in
  • Existing content remains visible
  • Can be reactivated at any time
  • Badge: Gray
Use Cases:
  • User requests temporary account pause
  • Inactive contributors
  • Pending verification
Account suspended due to violations
  • Cannot log in
  • May have content hidden
  • Requires admin review to reactivate
  • Badge: Red
Use Cases:
  • Policy violations
  • Spam activity
  • Security concerns

Changing User Status

Quick Actions:
  1. To Suspend an Active User:
    • Click the UserX icon (❌) in the Actions column
    • User status changes to Suspended
    • User is immediately logged out
  2. To Activate a Suspended/Inactive User:
    • Click the UserCheck icon (✅) in the Actions column
    • User status changes to Active
    • User can log in again
Status changes are applied immediately and don’t require confirmation. Use with care.

User Statistics

The platform tracks various user statistics visible in the user table:

Available Metrics

  • Posts Created: Total posts authored by the user
  • Posts Published: Number of posts that reached published status
  • Comments: Total comments made (for commenters) or approved (for editors)
  • Users Managed: Number of users managed (administrators only)
  • Total Views: Cumulative views on user’s posts
Use statistics to identify:
  • Top contributors for potential role upgrades
  • Inactive users for status review
  • High-performing content creators

Searching and Filtering Users

Search Functionality

The search bar supports real-time filtering:
Searchable Fields:
- First name
- Last name
- Email address
Example searches:
  • “john” - Finds John Smith, Johnny Doe
  • “@gmail” - Finds all Gmail users
  • “editor” - Finds users with “editor” in their name (not role)

Filter by Role

Use the role dropdown to filter:
  • All roles (default)
  • Administrador
  • Editor
  • Escritor
  • Autor
  • Comentador
Filters can be combined with search for precise results.

User Actions Quick Reference

IconActionPurposePermission Required
✏️ EditEdit user detailsUpdate user informationAdmin
🛡️ ShieldChange roleAssign different roleAdmin
❌ UserXSuspend userDeactivate accountAdmin
✅ UserCheckActivate userReactivate accountAdmin
🗑️ TrashDelete userPermanently remove userAdmin
👤 UsersView profileSee detailed user profileAdmin

Creating New Users

Click the “New User” button to create a new user account:
1

Enter User Information

Required fields:
  • Username
  • Email address
  • First name
  • Last name
  • Password
2

Assign Initial Role

Select the appropriate role based on the user’s intended access level.
Start with lower permissions (Autor or Comentador) and upgrade as needed.
3

Set Initial Status

Choose whether the account starts as:
  • Active (can log in immediately)
  • Inactive (requires activation)
4

Save and Notify

  • Save the user account
  • Optionally send welcome email with credentials

Deleting Users

Permanent Action: User deletion cannot be undone. All user data will be removed.

Deletion Process

1

Click Delete Icon

Click the trash icon (🗑️) in the user’s Actions column.
2

Confirm Deletion

A confirmation dialog appears:
  • Title: “Eliminar usuario”
  • Warning: Action is irreversible
  • Buttons: Cancel or Confirm
3

Final Confirmation

Click “Eliminar” to permanently delete the user.
The user’s posts and comments may be retained or reassigned based on platform configuration.

Best Practices

Role Assignment

  1. Start Conservative
    • Assign minimal permissions initially
    • Upgrade roles based on demonstrated need and trustworthiness
  2. Regular Audits
    • Review user roles quarterly
    • Remove unnecessary elevated permissions
    • Check for inactive admin accounts
  3. Role Separation
    • Maintain at least 2 administrators
    • Don’t give admin access unnecessarily
    • Use Editor role for content managers

Security Considerations

Admin Account Security:
  • Never share admin credentials
  • Enable two-factor authentication
  • Monitor admin activity logs
  • Remove admin access when no longer needed

User Status Management

  1. Suspension Policy
    • Document reasons for suspension
    • Set review periods for suspended accounts
    • Communicate with users about status changes
  2. Inactive Users
    • Regularly review inactive accounts (no login in 90+ days)
    • Consider status change to Inactive
    • Purge completely inactive accounts after 1 year

Troubleshooting

Possible causes:
  • You don’t have admin permissions
  • Trying to change your own role
  • Backend API connection issue
Solutions:
  • Verify you have admin_completo permission
  • Ask another admin to change your role
  • Check network connection and try again
Causes:
  • User’s session hasn’t expired
  • Browser cache issues
Solutions:
  • Status changes apply immediately for new logins
  • Active sessions may persist for up to 24 hours
  • For immediate effect, user must log out and back in
Reasons:
  • User is referenced by other content
  • Database constraint protection
  • Insufficient permissions
Solutions:
  • Reassign user’s content first
  • Use Suspend status instead
  • Contact system administrator

Technical Reference

Source Code References:
  • Users Table Component: src/components/admin/UsersTable.tsx:13
  • Role Management: src/services/usersService.ts:80
  • Permission Checking: src/hooks/usePermissions.tsx
  • Role Definitions: src/data/rolePermissions.ts

Build docs developers (and LLMs) love