You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2026/03/10 08:51:26 UTC

[PR] JAMES-4189 Ability to list users by domain [james-project]

chibenwa opened a new pull request, #2973:
URL: https://github.com/apache/james-project/pull/2973

   (no comment)


-- 
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: notifications-unsubscribe@james.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-4189 Ability to list users by domain [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on code in PR #2973:
URL: https://github.com/apache/james-project/pull/2973#discussion_r2925526541


##########
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:
   > just to be clear : my comment was not a request for change I don't think I ever used james without virtual hosting so I really don't know :D
   
   Yes but the legitimate question made me realize we could do a better job here.
   
   > but if my comment made you rethink the implem, its fine too :D
   
   :+1: 



-- 
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: notifications-unsubscribe@james.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-4189 Ability to list users by domain [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa merged PR #2973:
URL: https://github.com/apache/james-project/pull/2973


-- 
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: notifications-unsubscribe@james.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-4189 Ability to list users by domain [james-project]

Posted by "jeantil (via GitHub)" <gi...@apache.org>.
jeantil commented on code in PR #2973:
URL: https://github.com/apache/james-project/pull/2973#discussion_r2925174435


##########
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:
   just to be clear : my comment was not a request for change I don't think I ever used james without virtual hosting so I really don't know :D 
   
   but if my comment made you rethink the implem, its fine too :D 



-- 
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: notifications-unsubscribe@james.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-4189 Ability to list users by domain [james-project]

Posted by "jeantil (via GitHub)" <gi...@apache.org>.
jeantil commented on code in PR #2973:
URL: https://github.com/apache/james-project/pull/2973#discussion_r2923938969


##########
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:
   🤔 I'm curious: what would happen if we did not do this check and let the method run and call listReactive then apply its filter ? 



-- 
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: notifications-unsubscribe@james.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-4189 Ability to list users by domain [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@james.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org