You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/05/01 12:27:09 UTC

[GitHub] [iotdb] LIU-WEI-git commented on a diff in pull request #5756: [IOTDB-2797] Fix [privilege] root.** doesn't work

LIU-WEI-git commented on code in PR #5756:
URL: https://github.com/apache/iotdb/pull/5756#discussion_r862467311


##########
server/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java:
##########
@@ -188,10 +188,14 @@ public static boolean validatePassword(String originPassword, String encryptPass
    *
    * @param pathA sub-path
    * @param pathB path
-   * @return True if pathA == pathB, or pathA is an extension of pathB, e.g. pathA = "root.a.b.c"
-   *     and pathB = "root.a"
+   * @return True if pathA == pathB, or pathA is an extension of pathB, or pathA is contained in the
+   *     semantics of "**" in pathB, e.g. pathA = "root.a.b.c" and pathB = "root.a" or pathB =
+   *     "root.a.**"
    */
   public static boolean pathBelongsTo(String pathA, String pathB) {
+    if (pathB.endsWith("**")) {

Review Comment:
   OK, I'll add this feature.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org