Getting `user_unauthorized` error while reading trying to document from the collection
- 0
- Databases
mm, thank you I guess I will add the permission while creating document... but one doubt I wonder how should I design arch, like should I create team for each business π€ and then when any documents get created just link the team to that document so that other team member can access
I mean this
for development I just added it for now
Oh...if document security is disabled, the permissions on the document don't do anything
Ok and?
I wonder then why I still can't access the document... may be I guess because I created it using console
What's your code or what's the network log?
So you can access the document now? But if you remove guest, you can't access the document?
yap correct
I didn't got this
That means you're not logged in. There's no session
πΆβπ«οΈ
let me check
it does show
This is in the console. In your client app, there's no session or at least it's not being used
umm, let me try logging out
Try calling account.get() before you fetch the document
I have made a appwrite service which act as centeral point of interaction between server and client
mm, I guess you are right now seems to be working after clearning cache
I wonder what approach would you suggest for this
or should I disable the document security which I feel is bad honestly to solve this
If you require different access for different documents, you must use document level security
Maybe a function to create the document where the function will put user and team in the permissions. Careful about letting the user update the document since they can update the permission to remove the team
if I make a function that all the document creation will have to route through it I guess, which seems not ideal I guess umm, I guess I will explain this problem in detail next Stage on next Thruday for now aim to first build logic layer for now
Recommended threads
- Auth not working on expo react native
I'm trying to launch a development server with expo go and appwrite as a backend. On my windows pc, I've got a local docker instance of appwrite running as my b...
- Bulk delete failed with 401
- I created a transaction to bulk delete rows in a table has `done` equal `true` follow documentation. But when run, it returns 401 unauthorized error as screen...
- In which format should i pass the date?
I have a column with the type `datetime`. So i want to know which format is suitable for passing the date
