Back

[CLOSED] Appwrite PHP SDK Document Permissions: Setting Read and Write Access

  • 1
  • Databases
  • Functions
  • Cloud
Drake
12 Aug, 2023, 14:43

Would you please try removing your custom status codes?

TL;DR
The user is asking about setting read and write access for documents in the Appwrite PHP SDK. They seem to be having trouble with the owner attribute. The community suggests using the Appwrite Console and deleting the document using the owner's ID. The user wonders if it's a problem that they can still delete the document even if the owner's ID is different from theirs. The community assures them that the console user has full access and it shouldn't be a problem. There is mention of creating a new post to avoid confusion between different users. The user also mentions a failed execution with custom status codes, and the community suggests removing them.
sidney
14 Aug, 2023, 07:24

I mean that after I send the payload in json format and execute it via appwrite console, if failes

sidney
14 Aug, 2023, 07:24
sidney
14 Aug, 2023, 07:25

Still failes

safwan
14 Aug, 2023, 09:56

can you show the data you are sending to the function in the payload?

sidney
14 Aug, 2023, 10:11

It works now, but is there any problem if after creating the document with the owner attribute different from my userId, I can delete it in Appwrite manually?

Drake
14 Aug, 2023, 15:41

sure! The console user has full access to all the data

harley_mlt
14 Aug, 2023, 20:57

So should I change the function? Wont be any problem if I do it after creating the document with the owners attribute being different from my user id, right?

Drake
14 Aug, 2023, 20:59

Are you working with the original poster on the same code?

harley_mlt
14 Aug, 2023, 21:35

No but its almost identical

harley_mlt
14 Aug, 2023, 21:36

I’ve been using the same method

Drake
14 Aug, 2023, 21:38

please create a new post so that discussions don't get mixed up between two people

harley_mlt
14 Aug, 2023, 21:44

Im sorry its me sidney. Its my phone account. I switched devices and i forgot to mention it

Drake
14 Aug, 2023, 21:45

ahhh ok

Drake
14 Aug, 2023, 21:45

sooooo, honestly, i didn't quite understand this question

harley_mlt
14 Aug, 2023, 21:49

What is the right method to add permissions so only the owner(attribute of the document) can delete and update the document. I am using php sdk to create a new document.

Drake
14 Aug, 2023, 21:50

you already have it so what's the problem?

harley_mlt
14 Aug, 2023, 21:55

Yes but after I execute the function in appwrite console, and sending the json payload with the owner attribute differente from my user id, I can still delete it. I wante to know if this is a problem or not?

Drake
14 Aug, 2023, 22:02

you can delete it using the Appwrite Console?

harley_mlt
14 Aug, 2023, 22:03

Not in console, just in Appwrite at documents

Drake
14 Aug, 2023, 22:03

what do you mean? maybe share a screenshot?

harley_mlt
14 Aug, 2023, 22:06
Drake
14 Aug, 2023, 22:06

This is the Appwrite Console and you're logged in as a Console user who has full rights to everything in the project. This is not a problem

harley_mlt
14 Aug, 2023, 22:08

Okay, I just wanted to be sure. Thnks

safwan
15 Aug, 2023, 18:40

[CLOSED] Appwrite PHP SDK Document Permissions: Setting Read and Write Access

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more