chibenwa commented on code in PR #2973:
URL: https://github.com/apache/james-project/pull/2973#discussion_r2923976822


##########
server/data/data-api/src/main/java/org/apache/james/user/api/UsersRepository.java:
##########
@@ -188,6 +188,13 @@ default Mono<Void> assertValidReactive(Username username) {
     }
 
     default Publisher<Username> listUsersOfADomainReactive(Domain domain) {
+        try {
+            if (!supportVirtualHosting()) {
+                return Flux.error(new 
IllegalStateException("listUsersOfADomainReactive is not supported when virtual 
hosting is disabled"));

Review Comment:
   We would return "empty"
   
   Which do not make sense.
   
   If I have `user1, user2, user3...` and ask for domainA
   
   Then the good answer is `user1, user2, user3...` and so on.
   
   Thus I propose we:
    - Remove the check
    - Return true or false based on virtualhosting line 194/201 - acting as a 
validity guard.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to