So, here's the code
TypeScript
try {
const name = email.split("@")[0];
const userID = ID.unique();
await account.create({
userId: userID,
email,
password,
name,
});
await tablesDB.createRow({
databaseId: DATABASE_ID,
tableId: "users",
rowId: userID,
data: {
name,
email,
}
});
} catch (error: unknown) {
console.log(error);
if (typeof error === "object" && error) {
throw (error as AppwriteException).message;
} else throw error;
}```
Here, on adding row to table, I am getting error `[AppwriteException: The current user is not authorized to perform the requested action.]` even though, on dashboard, the data is being added successfully
My permissions for `users` table is (pfa)
I'm not sure how to fix this
TL;DR
Code is successfully adding data to the database but encountering a permission error. Check the permission settings for the `users` table in the dashboard. Make sure the current user has the necessary permissions to write to the table. If the data is being added successfully, it might be a casing issue or you're looking at the wrong database.Recommended threads
- Cloud function deploy stucks in processi...
Been trying for the last hours to deploy my function but for whatever reason, alwasy stuck on processing!
- One-time Cloud migration blocked by data...
Hi, I’m blocked on a one-time migration from Appwrite Cloud to my self-hosted Appwrite instance. We already fixed the region issue, and the migration now corre...
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...