Hi, I'm trying to create a set of registers in a table using the tableDB.createOperations function, but it seems like it doesnt support/expect the usage of the permissions array, similar to what we have when creating a row.
Something like this below:
const operations = [{
action: 'create' as const,
databaseId: DATABASE_ID,
tableId: TABLE_ID,
rowId: rowId,
data: registerData,
permissions: [
Permission.read(Role.user(userId)),
Permission.update(Role.user(userId))
]
}]
await tablesDB.createOperations({
transactionId: tx.$id,
operations,
})
When I execute the flow, it creates all the operations, but ignoring the permissions array, which is creating a situation where the users dont have access to their own rows.
Do you know if it's possible to define this permissions array using these operations? If it's not possible, how are you handling situations with Row Security where you need to create a bunch of rows at once?
How to set permissions using the createOperations function?
Have you tried to set permission in data? If I'm not wrong that is how I do it in my project
Recommended threads
- Finding job
Hi. I am a full-stack developer with experience in developing scalable and user-friendly web applications. I handle both front-end and back-end development, im...
- CDN not delivering correct bundle
My site 69b4cd410035893573dc is not delivering the latest deployed version via CDN, it seems stuck on versions from previoiu days, alternative links for the lat...
- Site ID: 6a22303d000c95ef93bdDomain: van...
multiple rapid deployments + a force push to master caused the router to lose the domain-to-deployment binding, even though the Domains tab shows the mapping is...