This is an automated email from the ASF dual-hosted git repository. yongzao pushed a commit to branch compute-resource-balance-1.2 in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit c9de5ca4c153580c75d330def04ae046f4ed414b Author: ZhangHongYin <[email protected]> AuthorDate: Thu Jul 13 21:12:16 2023 +0800 [IOTDB-5134] add MAINTAIN privilege (#10549) --- .../antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 | 5 +++++ .../java/org/apache/iotdb/commons/auth/entity/PrivilegeType.java | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 index d1cac40b30d..26e62b1ec49 100644 --- a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 +++ b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/SqlLexer.g4 @@ -917,6 +917,7 @@ PRIVILEGE_VALUE | USE_CQ | USE_PIPE | MANAGE_DATABASE + | MAINTAIN ; READ_DATA @@ -967,6 +968,10 @@ MANAGE_DATABASE : M A N A G E '_' D A T A B A S E ; +MAINTAIN + : M A I N T A I N + ; + SCHEMA_REPLICATION_FACTOR : S C H E M A '_' R E P L I C A T I O N '_' F A C T O R ; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/entity/PrivilegeType.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/entity/PrivilegeType.java index 8f5f7bbd131..9c1203fd11d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/entity/PrivilegeType.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/entity/PrivilegeType.java @@ -40,6 +40,7 @@ public enum PrivilegeType { USE_CQ, USE_PIPE, MANAGE_DATABASE(true), + MAINTAIN, READ(true, false, READ_DATA, READ_SCHEMA), WRITE(true, false, WRITE_DATA, WRITE_SCHEMA), ALL( @@ -54,7 +55,8 @@ public enum PrivilegeType { USE_TRIGGER, USE_CQ, USE_PIPE, - MANAGE_DATABASE); + MANAGE_DATABASE, + MAINTAIN); private static final int PRIVILEGE_COUNT = values().length;
