This is an automated email from the ASF dual-hosted git repository.

fuweng11 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new e92cb3c293 [INLONG-12144][Manager] Perform permission verification for 
the deletion operation of streamsource (#12145)
e92cb3c293 is described below

commit e92cb3c2930025f49ffefc93bf93a4ac5f57d4a9
Author: fuweng11 <[email protected]>
AuthorDate: Mon Jun 22 09:57:33 2026 +0800

    [INLONG-12144][Manager] Perform permission verification for the deletion 
operation of streamsource (#12145)
    
    Co-authored-by: wakefu <[email protected]>
---
 .../inlong/manager/service/source/StreamSourceServiceImpl.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/StreamSourceServiceImpl.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/StreamSourceServiceImpl.java
index b285bfaf6d..e8c6073729 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/StreamSourceServiceImpl.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/StreamSourceServiceImpl.java
@@ -385,7 +385,13 @@ public class StreamSourceServiceImpl implements 
StreamSourceService {
                 groupId, streamId, operator);
         Preconditions.expectNotBlank(groupId, ErrorCodeEnum.GROUP_ID_IS_EMPTY);
         Preconditions.expectNotBlank(streamId, 
ErrorCodeEnum.STREAM_ID_IS_EMPTY);
-
+        InlongGroupEntity groupEntity = groupMapper.selectByGroupId(groupId);
+        if (groupEntity == null) {
+            throw new BusinessException(ErrorCodeEnum.GROUP_NOT_FOUND,
+                    String.format("InlongGroup does not exist with 
InlongGroupId=%s", groupId));
+        }
+        userService.checkUser(groupEntity.getInCharges(), operator,
+                "Current user does not have permission to delete source info");
         int sourceCount = sourceMapper.logicalDeleteByRelatedId(groupId, 
streamId,
                 SourceStatus.TO_BE_ISSUED_DELETE.getCode());
         int fieldCount = sourceFieldMapper.updateByRelatedId(groupId, 
streamId);

Reply via email to