mirror of
https://github.com/zhigang1992/firecms.git
synced 2026-06-16 02:24:23 +08:00
767 B
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
})
});