jerqi commented on code in PR #7736:
URL: https://github.com/apache/gravitino/pull/7736#discussion_r2219142812


##########
server/src/main/java/org/apache/gravitino/server/web/rest/UserOperations.java:
##########
@@ -92,9 +105,26 @@ public Response listUsers(
           httpRequest,
           () -> {
             if (verbose) {
-              return Utils.ok(
-                  new UserListResponse(
-                      
DTOConverters.toDTOs(accessControlManager.listUsers(metalake))));
+              User[] users = accessControlManager.listUsers(metalake);
+              users =
+                  Arrays.stream(users)
+                      .filter(
+                          user -> {
+                            NameIdentifier[] nameIdentifiers =
+                                new NameIdentifier[] {
+                                  NameIdentifierUtil.ofUser(metalake, 
user.name())
+                                };
+                            return MetadataFilterHelper.filterByExpression(
+                                        metalake,
+                                        "METALAKE::OWNER || USER::SELF",

Review Comment:
   The user who has the privilege `MANAGE_USER` can see  all the users, too.



-- 
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