mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
RDAP: Add link to static TOS page
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=219332975
This commit is contained in:
parent
57f06258d3
commit
09202562c7
3 changed files with 48 additions and 23 deletions
|
@ -1225,6 +1225,18 @@ public final class RegistryConfig {
|
|||
return ImmutableList.copyOf(Splitter.on('\n').split(config.registryPolicy.rdapTos));
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to static Web page with RDAP terms of service. Displayed in RDAP responses.
|
||||
*
|
||||
* @see google.registry.rdap.RdapJsonFormatter
|
||||
*/
|
||||
@Provides
|
||||
@Config("rdapTosStaticUrl")
|
||||
@Nullable
|
||||
public static String provideRdapTosStaticUrl(RegistryConfigSettings config) {
|
||||
return config.registryPolicy.rdapTosStaticUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the help text to be used by RDAP.
|
||||
*
|
||||
|
@ -1235,11 +1247,15 @@ public final class RegistryConfig {
|
|||
@Provides
|
||||
@Config("rdapHelpMap")
|
||||
public static ImmutableMap<String, RdapNoticeDescriptor> provideRdapHelpMap(
|
||||
@Config("rdapTos") ImmutableList<String> rdapTos) {
|
||||
@Config("rdapTos") ImmutableList<String> rdapTos,
|
||||
@Config("rdapTosStaticUrl") @Nullable String rdapTosStaticUrl) {
|
||||
return new ImmutableMap.Builder<String, RdapNoticeDescriptor>()
|
||||
.put("/", RdapNoticeDescriptor.builder()
|
||||
.put(
|
||||
"/",
|
||||
RdapNoticeDescriptor.builder()
|
||||
.setTitle("RDAP Help")
|
||||
.setDescription(ImmutableList.of(
|
||||
.setDescription(
|
||||
ImmutableList.of(
|
||||
"domain/XXXX",
|
||||
"nameserver/XXXX",
|
||||
"entity/XXXX",
|
||||
|
@ -1252,12 +1268,16 @@ public final class RegistryConfig {
|
|||
"entities?handle=XXXX",
|
||||
"help/XXXX"))
|
||||
.setLinkValueSuffix("help/")
|
||||
.setLinkHrefUrlString("https://github.com/google/nomulus/blob/master/docs/rdap.md")
|
||||
.setLinkHrefUrlString(
|
||||
"https://github.com/google/nomulus/blob/master/docs/rdap.md")
|
||||
.build())
|
||||
.put("/tos", RdapNoticeDescriptor.builder()
|
||||
.put(
|
||||
"/tos",
|
||||
RdapNoticeDescriptor.builder()
|
||||
.setTitle("RDAP Terms of Service")
|
||||
.setDescription(rdapTos)
|
||||
.setLinkValueSuffix("help/tos")
|
||||
.setLinkHrefUrlString(rdapTosStaticUrl)
|
||||
.build())
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -88,6 +88,7 @@ public class RegistryConfigSettings {
|
|||
public String reservedTermsExportDisclaimer;
|
||||
public String whoisDisclaimer;
|
||||
public String rdapTos;
|
||||
public String rdapTosStaticUrl;
|
||||
public String spec11EmailBodyTemplate;
|
||||
}
|
||||
|
||||
|
|
|
@ -145,6 +145,10 @@ registryPolicy:
|
|||
|
||||
We reserve the right to modify this agreement at any time.
|
||||
|
||||
# Link to static Web page with RDAP terms of service. Displayed in RDAP
|
||||
# responses. If null, no static Web page link is generated.
|
||||
rdapTosStaticUrl: null
|
||||
|
||||
# Body of the spec 11 email sent to registrars.
|
||||
# Items in braces are to be replaced.
|
||||
spec11EmailBodyTemplate: |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue