in core/project/src/main/kotlin/io/klibs/core/project/blacklist/BlacklistService.kt [28:46]
fun banPackage(groupId: String, artifactId: String, reason: String?): Boolean {
if (!blacklistRepository.checkPackageExists(groupId, artifactId)) {
return false
}
if (blacklistRepository.checkPackageBanned(groupId, artifactId)) {
return false
}
val projectIds = findProjectIdsByPackage(groupId, artifactId)
blacklistRepository.addToBannedPackages(groupId, artifactId, reason)
blacklistRepository.removeBannedPackages(groupId, artifactId)
blacklistRepository.removeBannedPackages()
updateConnectedProjects(projectIds)
return true
}