added deadline registration condition during domain registration from… #2643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #2641
What is the problem?
When a user wins an auction and receives a registration code, they have 30 days to register the domain. If the domain is not registered within this time frame, it goes back to the next round of the auction. Two tasks in the auction are responsible for this: DomainRegistrationCheckJob and ResultStatusUpdateJob. The first task reports on the auction statuses, while the second one checks if the domain is registered or not. When the DomainRegistrationCheckJob task indicates that the deadline has passed, a new status "domain_not_registered" is set for the auction, indicating that the domain is going for another round. At the same time, the registry should be notified about this so that domain registration stops because the deadline has passed. However, if a user who has won the domain decides to register it between the status update in the auction and the request for the new status in the registry, the domain will end up in both the auction and registered to the user.
How is the problem solved?
The auction also sends information about the registration deadline when the auction status is "payment_received." This attribute should be used to address this issue. If a user decides to register the domain after the deadline has passed, a comparison should be made between the current time and the deadline. If the user is late, an EPP 2306 error should be returned, indicating that the domain is already in the auction.
How to test?
To test this, win a domain in the auction and obtain the code. Set the domain status in the auction to "domain_not_registered." In the registry, set a date earlier than the current date for the auction model's "registration_deadline" attribute. Make sure the auction status is "payment_received," and then try to create a domain with the name of the auction you won.