in src/main/kotlin/org/jetbrains/teamcity/github/AuthDataStorage.kt [158:172]
fun removeAllForUser(userId: Long) {
while (true) {
val keysToRemove: Collection<String> =
myDataLock.read {
myData.entries.filter { it.value.userId == userId }.map { it.key }
}
if (keysToRemove.isEmpty()) break
myDataLock.write {
myData.keys.removeAll(keysToRemove)
myDataModificationCounter++
}
schedulePersisting()
}
LOG.info("Removed all auth data related for user $userId")
}