Accessing db collection with document permission from server side
- 0
- Self Hosted
- Functions
- Databases
Hi, struggling with accessing db collection with document permission from server side. An example:
- I have collection with document permission enabled named
user_file_queue
, where authenticated users save URL of file to download. - I have a NodeJS server function, that should go over
user_file_queue
records and download those files (started by CRON). - Also, there is another table, called
user_downloaded_files
, where file_id is saved after file is download to bucket.
How can I get all records from user_file_queue
as server side function? As it stated in docs:
When using a Server SDK in combination with the proper API key scopes, you can have any type of access to any of your project resources regardless of their permissions.
I assume that server function should have access to all documents in the table, but seems like that is not the case as db.listDocuments() returns 0 rows. Any help is appreciated, thank you.
Recommended threads
- Seed db
hello there... is this correct way to seed appwrite
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?