rename subdomains column
This commit is contained in:
parent
187bddaf8d
commit
0e59e02ef0
@ -2,10 +2,10 @@ INSERT INTO domain_option (domain_option_name)
|
||||
VALUES ('letsencrypt');
|
||||
|
||||
ALTER TABLE domain
|
||||
ADD COLUMN cert_dns_alt_names CHARACTER VARYING(512);
|
||||
ADD COLUMN valid_subdomain_names CHARACTER VARYING(512);
|
||||
|
||||
UPDATE domain
|
||||
SET cert_dns_alt_names = domain_name || ',www.' || domain_name ;
|
||||
SET valid_subdomain_names = '*' ;
|
||||
|
||||
INSERT INTO contactrole_ref (contact_id, role)
|
||||
( SELECT contact_id, 'voting-right' FROM contact );
|
||||
|
@ -62,8 +62,8 @@ public class Domain extends AbstractEntity {
|
||||
inverseJoinColumns={@JoinColumn(name="domain_option_id", referencedColumnName="domain_option_id")})
|
||||
private Set<DomainOption> domainoptions;
|
||||
|
||||
@Column(name = "cert_dns_alt_names", columnDefinition = "character varying(512)")
|
||||
private String certDNSAltNames;
|
||||
@Column(name = "valid_subdomain_names", columnDefinition = "character varying(512)")
|
||||
private String validSubdomainNames;
|
||||
|
||||
public Domain() {
|
||||
}
|
||||
@ -182,12 +182,12 @@ public class Domain extends AbstractEntity {
|
||||
this.domainoptions = domainOptions;
|
||||
}
|
||||
|
||||
public String getCertDNSAltNames() {
|
||||
return certDNSAltNames;
|
||||
public String getValidSubdomainNames() {
|
||||
return validSubdomainNames;
|
||||
}
|
||||
|
||||
public void setCertDNSAltNames(String certDNSAltNames) {
|
||||
this.certDNSAltNames = certDNSAltNames;
|
||||
public void setValidSubdomainNames(String validSubdomainNames) {
|
||||
this.validSubdomainNames = validSubdomainNames;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ public class DomainModuleImpl extends AbstractModuleImpl {
|
||||
}
|
||||
dom.setDomainoptions(domainOptions);
|
||||
}
|
||||
if (dom.getCertDNSAltNames() == null) {
|
||||
dom.setCertDNSAltNames(domName + ",www." + domName);
|
||||
if (dom.getValidSubdomainNames() == null) {
|
||||
dom.setValidSubdomainNames("www");
|
||||
}
|
||||
if (dom.isPacDomain()) {
|
||||
em.persist(new EMailAddress("owner", "", dom, dom.getUser().getPac().getCustomer().getName().substring(6) + "@hostsharing.net"));
|
||||
|
@ -47,6 +47,8 @@ public class DomainRemote extends AbstractRemote {
|
||||
domainOptionsList.add(opt.getName());
|
||||
}
|
||||
}
|
||||
final String validsubdomains = dom.getValidSubdomainNames();
|
||||
resultMap.put("validsubdomains", validsubdomains);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,6 +75,10 @@ public class DomainRemote extends AbstractRemote {
|
||||
}
|
||||
dom.setDomainoptions(domainOptionsSet);
|
||||
}
|
||||
final Object validsubdomains = setParams.get("validsubdomains");
|
||||
if (validsubdomains != null && validsubdomains instanceof String) {
|
||||
dom.setValidSubdomainNames((String) validsubdomains);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user