Back

[CLOSED] Appwrite thinks that Creating a new document is updating a document

  • 0
  • Self Hosted
  • Flutter
laurencetroyv
6 Nov, 2023, 07:18

I'm getting an error trying to add a new document on my appwrite database. The error that sentry detected was Missing "update" permission for role "label:admin". Only "["any","users","user:6548688e403bccb1a2c1","user:6548688e403bccb1a2c1\/verified","users\/verified","team:6537e80e997d158f9352","member:6548832c3fc49ca93f31","team:6537e80e997d158f9352\/nurse","team:6537e80e997d158f9352\/doctor","label:nurse","label:doctor"]" scopes are allowed and "["label:admin"]" was given., while the error in the development tool is Server Error.

the collection rule are only users with label of doctor and nurse are allowed but only nurse can create a new document.

TL;DR
Issue: When trying to create a new document in Appwrite, it is being recognized as an update instead. Getting an error related to permissions. Solution: The issue may be due to a relation in the Collection. Check the Collection rules and ensure that only users with the labels of "doctor" and "nurse" are allowed. Additionally, check the specific permissions for the "nurse" label to ensure they have the necessary permissions to create a new document.
laurencetroyv
6 Nov, 2023, 07:33

appwrite thinks that I'm updating a document when in fact I'm trying to create a new document

laurencetroyv
6 Nov, 2023, 07:41

Appwrite thinks that Creating a new document is updating a document

ideclon
6 Nov, 2023, 10:18

I’m not certain, but my guess is that it has something to do with a relation in your Collection

laurencetroyv
7 Nov, 2023, 15:16

[CLOSED] Appwrite thinks that Creating a new document is updating a document

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