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


##########
core/src/main/java/org/apache/gravitino/authorization/UserGroupManager.java:
##########
@@ -109,6 +113,25 @@ User getUser(String metalake, String user) throws 
NoSuchUserException {
     }
   }
 
+  String[] listUserNames(String metalake) {
+    return 
Arrays.stream(listUsers(metalake)).map(User::name).toArray(String[]::new);
+  }
+
+  User[] listUsers(String metalake) {
+    try {
+      Namespace namespace = AuthorizationUtils.ofUserNamespace(metalake);
+      return store.list(namespace, UserEntity.class, 
Entity.EntityType.USER).stream()
+          .map(entity -> (User) entity)

Review Comment:
   Yes, I only get the user list here. I won't fetch roles unless they are 
needed. Now the roles is empty for every user.



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