Rank 2: Process
Hello everyone! 😊
At the moment I have a collection named User Profiles. The purpose of this collection is to store usernames and some meta data.
The collection is accessible for all users: The read permission is set for Users. All users of my app should be able to access the User Profiles documents.
Now the problem is that a malicious person could use the Database.listDocuments function of the Appwrite SDK to list (steal) all username of my app. 🦹🏻
So I'm looking for a way so that documents of a collection can still be retrieved by ID, but cannot be listed.
My solution would be to remove all permissions from the User Profiles collection and create a cloud function "Get User Profile" that returns a profile by a given ID. But I'm trying to limit the use of cloud functions, as they're expensive.
Does anyone know if there's a way to prevent listing, but still allow reading from a collection without the use of cloud functions?