mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
domain: add recovery passoword in config panel
This commit is contained in:
parent
97c2cdc593
commit
fc68f769f9
2 changed files with 16 additions and 0 deletions
|
@ -545,6 +545,9 @@ def _get_registrar_config_section(domain):
|
|||
"value": "yunohost",
|
||||
}
|
||||
)
|
||||
registrar_infos["recovery_password"] = OrderedDict(
|
||||
{"type": "password", "ask": m18n.n("ask_dyndns_recovery_password"), "default": ""}
|
||||
)
|
||||
return OrderedDict(registrar_infos)
|
||||
elif is_special_use_tld(dns_zone):
|
||||
registrar_infos["registrar"] = OrderedDict(
|
||||
|
|
|
@ -317,6 +317,11 @@ def domain_add(
|
|||
pass
|
||||
raise e
|
||||
|
||||
if dyndns and dyndns_recovery_password:
|
||||
domain_config_set(
|
||||
domain, "dns.registrar.recovery_password", dyndns_recovery_password
|
||||
)
|
||||
|
||||
hook_callback("post_domain_add", args=[domain])
|
||||
|
||||
logger.success(m18n.n("domain_created"))
|
||||
|
@ -704,6 +709,14 @@ class DomainConfigPanel(ConfigPanel):
|
|||
domain=self.entity,
|
||||
other_app=app_map(raw=True)[self.entity]["/"]["id"],
|
||||
)
|
||||
if (
|
||||
"recovery_password" in self.future_values
|
||||
and self.future_values["recovery_password"]
|
||||
!= self.values["recovery_password"]
|
||||
):
|
||||
domain_dyndns_set_recovery_password(
|
||||
self.entity, self.future_values["recovery_password"]
|
||||
)
|
||||
|
||||
super()._apply()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue