mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-11 00:05:36 +02:00
31 lines
786 B
TypeScript
31 lines
786 B
TypeScript
// Docs: https://www.instantdb.com/docs/permissions
|
|
|
|
import type { InstantRules } from "@instantdb/core";
|
|
|
|
const rules = {
|
|
/**
|
|
* Welcome to Instant's permission system!
|
|
* Right now your rules are empty. To start filling them in, check out the docs:
|
|
* https://www.instantdb.com/docs/permissions
|
|
*
|
|
* Here's an example to give you a feel:
|
|
* posts: {
|
|
* allow: {
|
|
* view: "true",
|
|
* create: "isOwner",
|
|
* update: "isOwner",
|
|
* delete: "isOwner",
|
|
* },
|
|
* bind: ["isOwner", "auth.id != null && auth.id == data.ownerId"],
|
|
* },
|
|
*/
|
|
// $default: {
|
|
// allow: {
|
|
// $default: "isOwner"
|
|
// },
|
|
// bind: ["isOwner", "auth.id != null && auth.id == data.ownerID"],
|
|
// }
|
|
} satisfies InstantRules;
|
|
|
|
export default rules;
|