Skip to content

Commit 9d37464

Browse files
committed
fix
1 parent d0a0752 commit 9d37464

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,6 @@ public boolean isGeneratedByPipe() {
287287

288288
@Override
289289
public void throwIfNoPrivilege() throws Exception {
290-
if (skipIfNoPrivileges) {
291-
return;
292-
}
293290
final InsertNode node = insertNode;
294291
if (Objects.isNull(node)) {
295292
// Event is released, skip privilege check
@@ -320,10 +317,14 @@ private void checkTableName(final String tableName) {
320317
userName,
321318
new QualifiedObjectName(getTableModelDatabaseName(), tableName),
322319
new UserEntity(Long.parseLong(userId), userName, cliHostname))) {
323-
throw new AccessDeniedException(
324-
String.format(
325-
"No privilege for SELECT for user %s at table %s.%s",
326-
userName, tableModelDatabaseName, tableName));
320+
if (skipIfNoPrivileges) {
321+
shouldParse4Privilege = true;
322+
} else {
323+
throw new AccessDeniedException(
324+
String.format(
325+
"No privilege for SELECT for user %s at table %s.%s",
326+
userName, tableModelDatabaseName, tableName));
327+
}
327328
}
328329
}
329330

0 commit comments

Comments
 (0)