Joey Joe JoeOriginal post
Web Developer
I'm trying to delete a row using the TablesDB typescript sdk and I'm initializing it with a session client. I've verified that my user has a valid session.
When running tablesDB.deleteRow, I always get a 401 user_unauthorized.
The table itself has no permissions set because this is an SSR web app. Instead, the row is configured with RLS and has the permission 'delete("team:68da0803001888be01b1/owner")' on it. This user is part of that team, and this user has the "owner" role.
Can row deletions only happen with the admin sdk or via a table-level configuration? Or am I missing something here.
Summary
Issue: Developer cannot delete a row using TablesDB TypeScript SDK with SessionClient, receiving a 401 user_unauthorized error message.
Solution: The user is part of the team and has the necessary permission 'delete("team:68da0803001888be01b1/owner")' to delete the row, configured with RLS. Check the session user's permissions and ensure they match the necessary permissions for row deletion, as table permissions are not explicitly set due to being an SSR web app. Check the session user's role and permissions for any discrepancies or additional authorizations required for deletion.