Skip to main content

Permissions

You can define the edit, create and delete permissions at the collection level, also depending on the logged-in user.

In the simpler case, you can directly assign the permissions

import { buildCollection } from "@camberi/firecms";
buildCollection({
path: "products",
schema: productSchema,
name: "Products",
permissions: {
edit: true,
create: true,
delete: false
}
});
import { buildCollection } from "@camberi/firecms";
buildCollection({
path: "products",
schema: productSchema,
name: "Products",
permissions: ({ user }) => ({
edit: true,
create: true,
delete: true
})
});