
Hi there, I want a user to update a Document he has read, update and delete permissions to. Now until he is the only one having any permissions this call works fine:
Document result = await databases!.updateDocument(
databaseId: AppConstants.privateEventsDatabaseId,
collectionId: AppConstants.eventsCollectionId,
documentId: event.id!,
data: event.toJson(),
permissions: event.appwritePermissions,
);
The method event.appwritePermissions creates a List<String> looking like this:
permissions = [
"read("user:648ade3b69d58f61c640")",
"update("user:648ade3b69d58f61c640")",
"delete("user:648ade3b69d58f61c640")",
"read("user:64df7d4a4cb958d68e76")",
]
Which is the same I get from Appwrite.
Question is, why cant I update the permissions in this form?
The full error looks like this:
AppwriteException (AppwriteException: user_unauthorized, Permissions must be one of: (any, users, user:648ade3b69d58f61c640, user:648ade3b69d58f61c640/verified, users/verified) (401))

A user can set permissions of a document to is own or users
or any
to set permission to other users you'll need to use the database server side SDK and you can do so using a function.

Ah okay, I thought a user with write permissions could set the permissions of other users too

SOLVED: Update Document permissions fails: user_unauthorized
Recommended threads
- My collection is not updating after csv ...
- How do I format an array in a CSV file t...
I want to import a CSV file to create a document on it on the AppWrite website. I have an attribute "name" of type String and "ingredients" which is of type St...
- my database attribute stuck in processin...
when i created attributes in collection 3 of those attributes become "processing", and they are not updating, the worst thing is that i cant even delete them s...
