Search docs...
K

Technical Documentation: Settings - User Management

Architecture

settings_users (Light Theme)settings_users (Dark Theme)

This component is a CRUD interface for the platform's centralized User database. It implements the RBAC (Role-Based Access Control) logic enforced on both the Frontend and Backend.

Technical Details

  • File Path: lib/screens/settings_screen.dart (User Tab)
  • Data Model: UserModel (Fields: ID, Username, Email, Role, CreatedAt).
  • Endpoints:
    • GET /api/users: List all.
    • POST /api/users: Create.
    • PATCH /api/users/:id: Update role/profile.
    • DELETE /api/users/:id: Remove access.

Role Logic

  • ADMIN: Unrestricted access to all screens, including Audit Logs and User Management.
  • OPERATOR: Access to all control screens (Nav, Teleop, Editor), but blocked from system-level settings and logs.
  • VIEWER: Read-only access to Dashboard and Analytics; all control widgets are visually disabled.

Implementation Details

  • Encryption: All password updates trigger a server-side Bcrypt hashing function.
  • UI Guarding: The AuthService on the frontend checks the user.role from the JWT token and uses conditional rendering to hide/disable restricted UI elements.
© 2026 Robotoai. All rights reserved.