Files
firecms/website/docs/collections/permissions.md
2021-10-01 16:24:12 +02:00

767 B

id, title, sidebar_label
id title sidebar_label
permissions Permissions 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
    })
});