Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Judge the owner forget reach with the lineage read record from the merged access lineage designs
garrytan330227dc3974
diff --git a/src/core/search/private-visibility.ts b/src/core/search/private-visibility.tsindex dcd5a154c3..9c07b9af11 100644--- a/src/core/search/private-visibility.ts+++ b/src/core/search/private-visibility.ts@@ -259,14 +259,14 @@ function lineageAccessSql(pageAlias: string, access: CallerAccess, ownPage: stri}/**- * GST-2346: GST-2490's owner read rule (ownerAccessSql, the opt-in off) and the privacy part, for the owner's explicit+ * GST-2346: GST-2490's owner read rule (lineageAccessSql, the opt-in off) and the privacy part, for the owner's explicit* identity and satisfied folder rules outside its read record, so a stored write can judge what its owner writer reads.- * access.owner_reads_restricted never applies here: a page kept to other members stays closed.+ * access.owner_reads_restricted and audience members never apply here: a page kept to other members stays closed.*/export function ownerReadPolicyFragment(pageAlias: string, identity: readonly string[], satisfied: readonly string[]): string {- const access: CallerAccess = { ...currentCallerAccess(), identity, satisfiedRuleIds: satisfied, ownerLineage: true, ownerReadsRestricted: false, restricted: true };- const ownPage = ownerReadPage(access);- return ownPage ? `(${ownerAccessSql(pageAlias, access, ownPage)} AND ${privacyPartSql(pageAlias)})` : 'FALSE';+ const access: CallerAccess = { ...currentCallerAccess(), identity, satisfiedRuleIds: satisfied, lineage: true, ownerReadsRestricted: false, audienceKindMembers: [], restricted: true };+ const ownPage = lineageReadPage(access);+ return ownPage ? `(${lineageAccessSql(pageAlias, access, ownPage)} AND ${privacyPartSql(pageAlias)})` : 'FALSE';}/**