Skip to content

Commit d78db55

Browse files
fuweng11wakefu
andauthored
[INLONG-12195][Manager] Add tenant verification to the source/get interface (#12196)
Co-authored-by: wakefu <wakefu@tencent.com>
1 parent 78636fd commit d78db55

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/StreamSourceServiceImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ public StreamSource get(Integer id) {
165165
throw new BusinessException(ErrorCodeEnum.SOURCE_INFO_NOT_FOUND,
166166
String.format("source not found by id=%s", id));
167167
}
168+
InlongGroupEntity groupEntity =
169+
groupMapper.selectByGroupId(entity.getInlongGroupId());
170+
if (groupEntity == null) {
171+
throw new BusinessException(ErrorCodeEnum.GROUP_NOT_FOUND);
172+
}
168173
StreamSourceOperator sourceOperator = operatorFactory.getInstance(entity.getSourceType());
169174
StreamSource streamSource = sourceOperator.getFromEntity(entity);
170175
LOGGER.debug("success to get source by id={}", id);

0 commit comments

Comments
 (0)