We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Future<Document> addChat(usera, userb) { String myname = usera['username']; String myid = usera['userid']; String opname = userb['username']; String opid = userb['userid']; String chatid = generateChatID(myid, opid); return databases.createDocument( databaseId: DATABASE, permissions: [ Permission.read(Role.user("user:$opid")), Permission.read(Role.user("user: $opid")), ], collectionId: MESSAGES, documentId: chatid, data: { 'chatid': chatid, 'users': [ "{\"name\": \"$myname\", \"userid\": \"$myid\"}", "{\"name\": \"$opname\", \"userid\": \"$opid\"}", ], }); }
Creates a New Document with Perms as above
I hv read the issue #106 but thats is for permitting Team as a whole but i need to Permit Single Users
but returning Error as
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: AppwriteException: user_unauthorized, Permissions must be one of: (any, users, user:mohamedkamran2211, user:mohamedkamran2211/unverified, users/unverified) (401)
Version 2.0.x
MacOS
I use Appwrite Cloud
The text was updated successfully, but these errors were encountered:
It's ok i came to know its for security reasons
Sorry, something went wrong.
No branches or pull requests
👟 Reproduction steps
👍 Expected behavior
Creates a New Document with Perms as above
I hv read the issue #106 but thats is for permitting Team as a whole but i need to Permit Single Users
👎 Actual Behavior
but returning Error as
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: AppwriteException: user_unauthorized, Permissions must be one of: (any, users, user:mohamedkamran2211, user:mohamedkamran2211/unverified, users/unverified) (401)
🎲 Appwrite version
Version 2.0.x
💻 Operating system
MacOS
🧱 Your Environment
I use Appwrite Cloud
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: