You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by su...@apache.org on 2020/07/31 01:23:14 UTC

[incubator-iotdb] branch jira_827 created (now 816ad27)

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

sunzesong pushed a change to branch jira_827
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git.


      at 816ad27  [IOTDB-827] Fix no permissions for operation LAST

This branch includes the following new commits:

     new 816ad27  [IOTDB-827] Fix no permissions for operation LAST

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-iotdb] 01/01: [IOTDB-827] Fix no permissions for operation LAST

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunzesong pushed a commit to branch jira_827
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 816ad2745a53989e8f5d25e73a3ac20974e4b3a1
Author: samperson1997 <sz...@mails.tsinghua.edu.cn>
AuthorDate: Fri Jul 31 09:22:48 2020 +0800

    [IOTDB-827] Fix no permissions for operation LAST
---
 server/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java     | 1 +
 .../test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java b/server/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java
index ca9676a..3ee55f5 100644
--- a/server/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java
+++ b/server/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java
@@ -127,6 +127,7 @@ public class AuthorityChecker {
       case INDEXQUERY:
       case MERGEQUERY:
       case AGGREGATION:
+      case LAST:
         return PrivilegeType.READ_TIMESERIES.ordinal();
       case DELETE:
         return PrivilegeType.DELETE_TIMESERIES.ordinal();
diff --git a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java
index 92f18d9..c4f0cd2 100644
--- a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java
+++ b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java
@@ -517,6 +517,8 @@ public class IoTDBAuthorizationIT {
     adminStmt.execute("GRANT USER tempuser PRIVILEGES 'READ_TIMESERIES' on root.a");
     userStmt.execute("SELECT * from root.a");
     userStmt.getResultSet().close();
+    userStmt.execute("SELECT LAST b from root.a");
+    userStmt.getResultSet().close();
 
     // revoke privilege to query
     adminStmt.execute("REVOKE USER tempuser PRIVILEGES 'READ_TIMESERIES' on root.a");