Caideyipi commented on code in PR #14805:
URL: https://github.com/apache/iotdb/pull/14805#discussion_r1947496563


##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java:
##########
@@ -201,6 +217,17 @@ public void revokePrivilegeFromRole(String roleName, 
PrivilegeUnion union) throw
     roleManager.revokePrivilegeFromEntity(roleName, union);
   }
 
+  @Override
+  public void revokeAllPrivilegeFromRole(String roleName) throws AuthException 
{
+    Role role = roleManager.getEntity(roleName);
+    if (role == null) {
+      throw new AuthException(
+          TSStatusCode.USER_NOT_EXIST, String.format("Role %s does not exist", 
roleName));
+    }
+    role.setObjectPrivilegeMap(new HashMap<>());
+    role.getSysPrivilege().removeIf(PrivilegeType::forRelationalSys);

Review Comment:
   Why are the 2 functions different?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to