( tableName: string, access: string, context: ExecutorOwnerPolicyContext | undefined, )
| 133 | * bound behavior. |
| 134 | */ |
| 135 | export const assertReachReadOnly = ( |
| 136 | tableName: string, |
| 137 | access: string, |
| 138 | context: ExecutorOwnerPolicyContext | undefined, |
| 139 | ): void => { |
| 140 | if (context === undefined) return; |
| 141 | if (context.reach !== "tenant" && context.writes !== "denied") return; |
| 142 | policyViolation( |
| 143 | `Storage ${access} on table "${tableName}" is not allowed: the platform view is read-only.`, |
| 144 | ); |
| 145 | }; |
| 146 | |
| 147 | /** Assert a create/upsert writes a row inside the bound partition. */ |
| 148 | export const assertOwnerWritable = ( |
no test coverage detected