Skip to content

Commit

Permalink
fix: NodeSearch权限校验失败 #2724
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoxuwan authored Nov 11, 2024
1 parent 5f365c4 commit 728fed0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ allprojects {
}
dependencies {
dependency("com.github.zafarkhaja:java-semver:${Versions.JavaSemver}")
dependency("org.apache.skywalking:apm-toolkit-logback-1.x:${Versions.SkyWalkingApmToolkit}")
dependency("org.apache.skywalking:apm-toolkit-trace:${Versions.SkyWalkingApmToolkit}")
dependency("net.javacrumbs.shedlock:shedlock-spring:${Versions.Shedlock}")
dependency("net.javacrumbs.shedlock:shedlock-provider-mongo:${Versions.Shedlock}")
dependency("com.google.code.gson:gson:${Versions.Gson}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.cloud.client.circuitbreaker.NoFallbackAvailableException
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.util.SortedSet
import java.util.concurrent.ThreadPoolExecutor

Expand Down Expand Up @@ -361,7 +360,7 @@ open class AbstractChartService : ArtifactService() {
"/${chartMetadata.name}-${chartMetadata.version}.tgz"
)
)
chartMetadata.created = convertDateTime(nodeMap[NODE_CREATE_DATE] as String)
chartMetadata.created = TimeFormatUtil.convertToUtcTime(nodeMap[NODE_CREATE_DATE] as LocalDateTime)
chartMetadata.digest = nodeMap[NODE_SHA256] as String
return chartMetadata
}
Expand Down Expand Up @@ -711,10 +710,5 @@ open class AbstractChartService : ArtifactService() {
const val PAGE_NUMBER = 0
const val PAGE_SIZE = 200000
const val V2_PAGE_SIZE = 20000

fun convertDateTime(timeStr: String): String {
val localDateTime = LocalDateTime.parse(timeStr, DateTimeFormatter.ISO_DATE_TIME)
return TimeFormatUtil.convertToUtcTime(localDateTime)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class ChartRepositoryServiceImpl(
helmProperties.domain, "$projectId/$repoName/charts/$chartName-$chartVersion.tgz"
)
)
chartMetadata.created = convertDateTime(it[NODE_CREATE_DATE] as String)
chartMetadata.created = TimeFormatUtil.convertToUtcTime(it[NODE_CREATE_DATE] as LocalDateTime)
chartMetadata.digest = it[NODE_SHA256] as String
ChartParserUtil.addIndexEntries(indexYamlMetadata, chartMetadata)
} catch (ex: HelmFileNotFoundException) {
Expand Down

0 comments on commit 728fed0

Please sign in to comment.