PeterOriginal post
Rank 1: Thread
I want to delete a document as a user (which has document permissions including delete), the document has a relation (the user has also document permissions on that document including delete).
I keep getting AppwriteException: The current user is not authorized to perform the requested action.
The typescript code I use to delete the document:
export async function deleteDocument(id: string) { return await databases.deleteDocument( DATABASE_ID, COLLECTION_ID, id ); }
Summary
Developers are getting an "Unauthorized" error when trying to delete a document, even with proper permissions. The issue may be with the relationship between the user and the document needing to be deleted. Double-check the permissions set for both the user and the document.