
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
- Query params are way too limiting in ter...
I was trying to list rows in a table that do not already exist in another table. I retrieved around 260 row IDs which are 13 characters in length each, and then...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
- REQUEST FAILED IN MIGRATION
I was trying to moved my archived project to a self-host database . Though the Project is "read only" but there's a message that I can view and migrate data to...
