Manik2375Original post
NodeJS Developer
So, here's the code
JavaScript
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 successfullyMy permissions for `users` table is (pfa)
I'm not sure how to fix thisSummary
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.