I am wanting to list the documents of a specific user from an admin panel. What would I need to do. I dont want to need to login as a user to see the documents they have perms to see.
What's your DB structure like? How would you know what document belongs to what user?
You can create a cloud function that get's all the documents, and separates them based on the user.
https://appwrite.io/docs/server/databases?sdk=nodejs-default#databasesListDocuments
They way I have done it is give the user perms on the document
Should I change it to submitting an the id of the user who crated the document?
That's what I do, yes.
Then I would just search for the id correct?
yes. you would list all documents, and then filter them based on id
[SOLVED] List documents of a user as admin
Recommended threads
- 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?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...