Skip to content

Options

By default, the records of a model can be created, updated and deleted from the back-office. The options property lets you disable these operations for everyone, whatever their role or team:

{
slug: 'invoices',
model: models.invoices,
options: {
canCreate: false,
canUpdate: false,
canDelete: false
}
}
Option Default Description
canCreate true Allows the creation of new records.
canUpdate true Allows the edition of existing records.
canDelete true Allows the deletion of records.

Options apply to everyone, including admins and developers. They are useful for models that must stay read-only in the back-office, such as invoices, payments or logs.

To grant different rights to different people, use team permissions instead. An operation is only possible if both the model options and the team permissions allow it.