Skip to content

Commit

Permalink
fix: 修复匿名查看公开仓库失败 TencentBlueKing#1710
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlkl authored Jan 25, 2024
1 parent 4e97dee commit d71b630
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,7 @@ open class PermissionServiceImpl constructor(
}

override fun listNoPermissionPath(userId: String, projectId: String, repoName: String): List<String> {
val user = userRepository.findFirstByUserId(userId) ?: run {
throw ErrorCodeException(AuthMessageCode.AUTH_USER_NOT_EXIST)
}
val user = userRepository.findFirstByUserId(userId) ?: return emptyList()

if (user.admin || isUserLocalAdmin(userId) || isUserLocalProjectAdmin(userId, projectId)) {
return emptyList()
Expand Down

0 comments on commit d71b630

Please sign in to comment.