Open MercatoDocsSearch docsAPI reference

CLI

mercato customer_accounts sync-customer-role-acls

Use this command for customer portal roles after a module adds features they should receive. Back-office staff roles use their own synchronization command.

yarn mercato customer_accounts sync-customer-role-acls merges each enabled module's setup.defaultCustomerRoleFeatures into the CustomerRoleAcl rows of the target tenant(s). It is the customer-portal counterpart of auth sync-role-acls: defaultCustomerRoleFeatures is otherwise merged during tenant setup only, so a tenant that already exists never receives portal features a module declares later.

The command lives in customer_accounts because that module owns the CustomerRole / CustomerRoleAcl entities and the merge helper both this command and seedDefaults call.

Usage

# Sync a single tenant (recommended)
yarn mercato customer_accounts sync-customer-role-acls --tenant <tenantId>

# Sync every tenant in the connected database
yarn mercato customer_accounts sync-customer-role-acls

Flags

FlagDefaultMeaning
--tenant <id>none – iterates every tenantRestrict the sync to one tenant. Accepts --tenantId and --tenant_id as aliases.

Behavior

When to Run

When NOT to Use

Troubleshooting

Previous: mercato configs cache · Next: yarn db:generate