mirror of
https://github.com/google/nomulus
synced 2026-08-28 11:56:11 +00:00
Add RDAP support for deleted domains and filtering by registrar
This CL adds the functionality for domain searches. Entities and nameservers have already been handled by previous CLs. Deleted items can only be seen by admins, and by registrars viewing their own deleted items. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172097922
This commit is contained in:
@@ -18,6 +18,7 @@ import static google.registry.flows.domain.DomainFlowUtils.validateDomainName;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.request.Action.Method.GET;
|
||||
import static google.registry.request.Action.Method.HEAD;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.flows.EppException;
|
||||
@@ -69,8 +70,10 @@ public class RdapDomainAction extends RdapActionBase {
|
||||
pathSearchString, getHumanReadableObjectTypeName(), e.getMessage()));
|
||||
}
|
||||
// The query string is not used; the RDAP syntax is /rdap/domain/mydomain.com.
|
||||
DomainResource domainResource = loadByForeignKey(DomainResource.class, pathSearchString, now);
|
||||
if (domainResource == null) {
|
||||
DomainResource domainResource =
|
||||
loadByForeignKey(
|
||||
DomainResource.class, pathSearchString, shouldIncludeDeleted() ? START_OF_TIME : now);
|
||||
if ((domainResource == null) || !shouldBeVisible(domainResource, now)) {
|
||||
throw new NotFoundException(pathSearchString + " not found");
|
||||
}
|
||||
return rdapJsonFormatter.makeRdapJsonForDomain(
|
||||
|
||||
Reference in New Issue
Block a user