How are you storing data from the user right now?
You can see here
as i have enable the document security then why its not working
If you want to have permission per user just remove the Users permission here and recheck
storing data inside a single collection
ok, let me check.
Can you share a bit of the structure?
users collection then document
But, what I mean, is that how are you telling database which document is from one user or another?
Just permissions?
via user id like getuser.$id
i have removed user permission which is collection permission now its showing me only the specific users document but unable create a new document because collections permission is removed,
Makes sense.
What would be the best practice now is to move the creation of a document to a function. And adding the permissions.
Or You can leave the only the create permission for the Users group
yes i did the same but its saying Unhandled Exception: AppwriteException: general_argument_invalid, Invalid permissions: Permission "create("user:6439c344c13c402c0629")" is not allowed. Must be one of: read, update, delete, write. (400) and this user is existing in my database
In code change it to write
Which means create
I think
ok let me try it
now its working Thanks, but why its not working with create, usually i use create for creating new documents inside collection
I'm not sure
no problem, is filtering users data by permission is a good decision for production level application ?
I didn't quite understand What you mean filtering by permissions?
Filtering the documents that each one can have access? If this is the case then sure
yes this is the case Filtering the documents that each one can have access? then it will not give any performance issue ?
Don't think so. I think this is how it meant to be used
Ok Thank you so much for your time and help.
Recommended threads
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...