dodil/erp-brick-lead

src/brick_lead/roles.yaml

# The default roles this brick ships (erp-platform 0.9.2: a brick decides by PERMISSION; the roles are the customer's).
# From the CRM spec's actors (erp-method modules/crm). A composition maps them to its own pool roles — the pool's
# catalog (`dodil appid roles get <pool> --org <org>`) is the deployed truth; `erp-compose check --roles` reads both.
roles:
  rep:       [lead:lead:write]
  manager:   [lead:lead:write, lead:lead:read_all, lead:lead:manage, lead:lead:assign, lead:policy:write]
  marketing: [lead:lead:import, lead:lead:read_all]
  scheduler: [lead:lead:score]                 # whatever runs the scoring job (a machine permission)
  campaigns: [lead:signal:record]              # the campaign brick's or a web hook's client (a machine permission)
service_clients: [scheduler, campaigns]