mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Add administrator privileges to RDAP
RDAP filters some contact data when the request is not authenticated as coming from a user associated with the registrar owning the contact. This CL adds an exception for admin users, which for the App Engine Users API are defined as App Engine project viewers. This means that the registry team will always get all information when logged in. This will also be useful when building tools that use RDAP output. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=168293820
This commit is contained in:
parent
211d89695a
commit
5b444d93fb
12 changed files with 152 additions and 40 deletions
|
@ -375,12 +375,12 @@ public class RdapDomainSearchAction extends RdapActionBase {
|
|||
List<DomainResource> domains, boolean isTruncated, DateTime now) {
|
||||
OutputDataType outputDataType =
|
||||
(domains.size() > 1) ? OutputDataType.SUMMARY : OutputDataType.FULL;
|
||||
Optional<String> loggedInClientId = getLoggedInClientId();
|
||||
RdapAuthorization authorization = getAuthorization();
|
||||
ImmutableList.Builder<ImmutableMap<String, Object>> jsonBuilder = new ImmutableList.Builder<>();
|
||||
for (DomainResource domain : domains) {
|
||||
jsonBuilder.add(
|
||||
rdapJsonFormatter.makeRdapJsonForDomain(
|
||||
domain, false, rdapLinkBase, rdapWhoisServer, now, outputDataType, loggedInClientId));
|
||||
domain, false, rdapLinkBase, rdapWhoisServer, now, outputDataType, authorization));
|
||||
}
|
||||
return RdapSearchResults.create(jsonBuilder.build(), isTruncated);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue