User Roles

User Roles

WeWorks uses role groups and optional RBAC permissions to control what each user sees and can do.

Role groups

Defined in the database (RoleGroup enum) and resolved per user:

GroupWhoTask visibility
ownerCustomers who create service requestsOnly tickets they created
taskerService providersTickets assigned to them or created by them
coordinatorOperations staffAll non-hidden tickets
adminisAdmin users or admin rolesAll tickets + admin panel

Role filtering is applied server-side in the API (/api/v1/tickets/filtered).

Owner

  • Dashboard shows progress on their latest task
  • Create tasks from the dashboard or sidebar New Task
  • Pay for services via wallet
  • View open/closed task history

Tasker

  • Register at /auth/register with worker profile and certificates
  • Tasker dashboard — map and list of available/unassigned jobs
  • Accept or reject tasker seeds (job offers)
  • Complete service workflow steps (schedule, in progress, complete, feedback)
  • Withdrawals — transfer wallet earnings to bank (/withdrawals)
  • Tax reporting — invoices and reports (/tax-reporting)

Coordinator

  • Same broad task visibility as admin for day-to-day coordination
  • Default stats dashboard (open, completed, unassigned counts)
  • Cannot access admin-only settings unless also an admin

Admin

  • Everything coordinators see, plus /admin panel:
    • Users, clients, tickets, roles
    • Service items, hardware, vouchers, withdrawals
    • Email, webhooks, SMTP, maps, AI config
  • Bypass role-group filters on ticket queries

External / portal users

Users with external_user: true are redirected to /portal — a simplified interface for submitting and tracking their own requests.

RBAC permissions (optional)

When config.roles_active is enabled, fine-grained permissions are stored on Role records, for example:

  • task::create, task::assign, user::manage, admin::panel

Seeded roles include OWNER, TASKER, and Admin. Legacy permission names are mapped in apps/api/src/lib/roles.ts.

The client sidebar (app-sidebar.tsx) adapts by role:

  • All users: Dashboard, Hardware shop, Tasks (open/closed), New Task
  • Taskers: Withdrawals, Tax reporting
  • Admins: Administration link

Assigning roles

Admins manage users at /admin/users. Each user has a role_group and optional RBAC role assignments. Taskers typically self-register; owners and coordinators are created or promoted by admins.