fixed issues namely reveloved around chat
This commit is contained in:
@@ -90,6 +90,8 @@ export const RULE_PARENT_SCOPED =
|
||||
"famId = @request.auth.famId && @request.auth.role = 'parent'";
|
||||
export const RULE_FAM_WRITE = "@request.body.famId = @request.auth.famId";
|
||||
export const RULE_FAM_SCOPED = "famId = @request.auth.famId";
|
||||
// Anyone in the family can read (list/view/subscribe) — members + parents.
|
||||
export const RULE_FAM_READ = "famId = @request.auth.famId";
|
||||
// fams has no self-referencing famId field; its record id IS the famId.
|
||||
export const RULE_OWN_FAM = "id = @request.auth.famId";
|
||||
|
||||
@@ -270,6 +272,8 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
createRule: RULE_FAM_WRITE,
|
||||
updateRule: RULE_FAM_SCOPED,
|
||||
deleteRule: RULE_FAM_SCOPED,
|
||||
listRule: RULE_FAM_READ,
|
||||
viewRule: RULE_FAM_READ,
|
||||
})(ids),
|
||||
},
|
||||
{
|
||||
@@ -286,6 +290,8 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
createRule: RULE_FAM_WRITE,
|
||||
updateRule: RULE_FAM_SCOPED,
|
||||
deleteRule: RULE_FAM_SCOPED,
|
||||
listRule: RULE_FAM_READ,
|
||||
viewRule: RULE_FAM_READ,
|
||||
})(ids),
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user