You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of, let me thank you for this great work, it helped immensely in setting up RBAC :)
While developing the user management part of my app I stumbled upon the following error: Deleting a user throws an error due to the update_user_roles function. This happens because I'm cascading the deletion of the user in the group_users table. This, in turn, triggers the update_user_roles function to update the user's roles, but it fails since it can't find the user. I believe a "User exists" check could be added to this function:
SELECT id
INTO _user_check_id
FROM auth.users au
WHERE au.id = _user_id;
IF _user_check_id IS NOT NULL THEN
The text was updated successfully, but these errors were encountered:
I'm having a hard time reproducing this. Can you let me know which version of the project you are using and provide a test example? If it's easier, feel free to set up a local supabase copy with migrations and dummy data that can reproduce when deleting.
Hello!
First of, let me thank you for this great work, it helped immensely in setting up RBAC :)
While developing the user management part of my app I stumbled upon the following error: Deleting a user throws an error due to the update_user_roles function. This happens because I'm cascading the deletion of the user in the group_users table. This, in turn, triggers the update_user_roles function to update the user's roles, but it fails since it can't find the user. I believe a "User exists" check could be added to this function:
The text was updated successfully, but these errors were encountered: