I have a collection that has write-only permission for all users, and the remaining permissions are based on the user ID. The Apple SDK is working fine as expected, meaning a user can only see their own entries.
However, I'm facing an issue with my Python cloud function, which needs to read data specific to a particular user ID. I want to list documents that are specific to the requested user instead of displaying the entire collection.
Quick help appreciated, Between this is crucial for the hackathon!
Summary
The user is experiencing an issue with their Python cloud function where they need to list documents that are specific to a requested user ID. They have a collection with write-only permission for all users, and the remaining permissions are based on the user ID. They are seeking quick help for this issue, as it is crucial for a hackathon.
Solution: The user can initialize their function client using the user JWT, which will ensure that only documents available for the user will be returned. They can refer to the provided links for more information on function variables and executing functions with the user JWT.
Binyamin
Jun 14, 2023, 04:17
When executing a function, if it is done by the user then the current user JWT is being sent.
That means you can initialize your function client using the user JWT.
Making use of the user JWT will make sure only documents that available for the user will return. Just like you're using the swift SDK.