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
Describe the Bug
Deleting a user which is still in use for permissions on a model leaves the model permissions in a bad state
Step To Reproduce
Create a user (I called it AAADONOTUSE)
Select any model and add that user with read permission to the model
Go back to the user admin and delete that user
Go back to the model and you see that the user name that previously said AAADONOTUSE shows up as a series of somewhat random characters. In this case it is BbEL9za/OIz++Tiuib56MVaIKTbacJy5hlff
Note that you can't delete that user permission (405 method not allowed, which I suspect is because of the random / in the name)
Expected Behavior
I would have expected that either
You aren't allowed to delete the user which exists on permissions (preferable) or
The user should be removed from the permissions automatically.
The text was updated successfully, but these errors were encountered:
I have verified this bug. This actually applies to the entire permissions system not just the models. Essentially what is happening now is the following.
Because several records in the database point to the user, when the user is deleted the user record is not actually removed from the database. Rather we change their username to a random set of characters and then mark them as deleted.
What we are not doing is removing them from the permissions in the system.
It would be nice if deleted users didn't show up when listing the users. I'm fine with them staying in the database, but if you know that it is a deleted user... then just don't show it.
The deleted user's do not show up in the system (when there are no bugs). The issue is just that their permission records were not deleted correctly. Once that is fixed they will not show up. Which is what I am working on as we speak.
mmacfadden
changed the title
Deleting users which are used in permissions leaves system in a bad state
Deleting users which are used in permissions, groups, or chats leaves system in a bad state
May 8, 2021
mmacfadden
changed the title
Deleting users which are used in permissions, groups, or chats leaves system in a bad state
Deleting users which are referenced in models, groups, or chats leaves system in a bad state
May 8, 2021
Versions
Describe the Bug
Deleting a user which is still in use for permissions on a model leaves the model permissions in a bad state
Step To Reproduce
AAADONOTUSE
)AAADONOTUSE
shows up as a series of somewhat random characters. In this case it isBbEL9za/OIz++Tiuib56MVaIKTbacJy5hlff
Note that you can't delete that user permission (405 method not allowed, which I suspect is because of the random / in the name)
Expected Behavior
I would have expected that either
The text was updated successfully, but these errors were encountered: