Skip to content

Staff Access Model

staff is a single manager table for BackOffice managers, CRM managers, and admins. The API does not split staff into separate dealer and CRM tables.

Access is separated by scopes and permission flags:

Field Type Description
access_backoffice int BackOffice/trading management scope
access_crm int CRM/sales/customer management scope
admin int Brand administrator flag. Grants all functional permissions but does not bypass brand
super_admin int Global administrator flag. Bypasses brand boundaries and permits brand administration
groups string Trading group visibility boundary
brand string Required visibility boundary for every non-super manager

Administrative scopes

  • admin = 1, super_admin = 0 is a brand admin with full functional permissions inside its own brand.
  • super_admin = 1 is a global super admin with cross-brand visibility.
  • A non-super manager with an empty brand has no customer, group, account, or trade visibility.
  • Only a super admin can assign super_admin = 1.
Manager ID Purpose Visibility and protection
1 Hidden break-glass recovery super administrator Never returned by manager list methods; cannot be deleted, disabled, or edited through normal manager administration methods
2 Default visible super administrator Cannot be deleted or demoted

Manager id=1 can authenticate through AuthManager and maintain its own password/OTP, but remains absent from CRM and BackOffice manager tables.

Migration Rules

When staff scope fields are added:

  • existing staff records get access_backoffice = 1
  • existing non-admin staff records get access_crm = 0
  • existing admins get access_backoffice = 1 and access_crm = 1
  • existing non-admin staff records get all CRM permissions as 0
  • existing admins get all CRM permissions as 1
  • manager IDs 1 and 2 are assigned super_admin = 1

CRM Permissions

Customer permissions:

Field Description
see_customers View customers
set_customers Create or update customers
del_customers Delete customers
export_customers Export customers
see_all_customers View all customers in the allowed CRM scope

Lead permissions:

Field Description
see_leads View leads
set_leads Create or update leads
del_leads Delete leads
convert_leads Convert leads to customers
assign_leads Assign or reassign leads
export_leads Export leads
see_all_leads View all leads in the allowed CRM scope

Notes and contacts permissions:

Field Description
see_notes View CRM notes
set_notes Create or update CRM notes
del_notes Delete CRM notes
see_customer_contacts View customer contact fields
set_customer_contacts Update customer contact fields

Finance permissions:

Field Description
see_finance View CRM finance
set_finance Create or update finance requests
approve_finance Approve finance requests
decline_finance Decline finance requests
export_finance Export finance records

Finance category permissions:

Field Description
see_deposits View deposits
set_deposits Create or update deposits
see_withdrawals View withdrawals
set_withdrawals Create or update withdrawals
see_credits View credits
set_credits Create or update credits
see_bonuses View bonuses
set_bonuses Create or update bonuses

These fields are exposed by the manager TCP API: