Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-1589

Contains domain does not work on auto detected domains

    XMLWordPrintableJSON

    Details

      Description

      Here are the following commands :

      root@yoda:/home/btellier# docker exec 9253 /root/james-server-app-3.0.0-beta5-SNAPSHOT/bin/james-cli.sh -h 127.0.0.1 -p 9999 listdomains
      domain
      james.linagora.com
      172.17.3.33
      172.17.3.33

      root@yoda:/home/btellier# docker exec 9253 /root/james-server-app-3.0.0-beta5-SNAPSHOT/bin/james-cli.sh -h 127.0.0.1 -p 9999 adduser toto@172.17.3.33 p
      Error while execute command:
      Domain does not exist in DomainList

      What we can see is that James list domains that do not really exists. I can not use an auto detected domain.

      Why ?

      Domain auto detection is done on AbstractDomainList in getDomains operation.

      It is not done in containsDomain operation.

      So when I try to add a user above, code fails on the containsDomain that returns false.

      Solution is to make the same resolution on containsUser

      Acceptance criteria :

      • I can add a user to an auto detected domain
      • Improve auto detection handling :
      • an auto detected domain can not be deleted ( returns specific error )
      • an auto detected domain can be added ( as we may want to persist it )
      • an auto detected domain is contained
      • an auto detected domain is listed
      • Tests should be written for auto detection handling for above stories

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              btellier Benoit Tellier
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: