A way to see users blocking deletion of authentication source #18694
Labels
topic/ui
Change the appearance of the Gitea UI
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
Feature Description
I recently added an OIDC source to test out. I uninstalled the provider and forgot about it.
When I was looking through and performing cleanup, I was not able to delete the authentication source from the Gitea Admin page. It kept complaining about source still in use. I was not able to see which user was using the auth source for me to go and delete that.
I went through the code + DB trying to find what was the row that it thought was causing the issue. I did not see any user using the login_source set to the one I was trying to delete. I was about to file a bug, but the logging doc talks about enabling SQL logging. Enabling it and trying to delete, I found the table
external_login_user
which listed my username as bound to the auth source I wanted gone.Then came the task of hunting what to do to get the entry deleted. Found that shortly under linked accounts in user settings albeit with three entries having the same name (!!). Deleting one on a hunch turned right and I was able to delete the auth source.
The feature request: Can this be made any simpler? To see a list of users using an auth source and for an admin to forcefully unbind the auth source and delete it without messing directly on the DB?
Screenshots
No response
The text was updated successfully, but these errors were encountered: