domain:config: restrict portal options to topest domains

This commit is contained in:
axolotle 2023-10-19 18:39:15 +02:00
parent 163dd4d359
commit 5bd8680847

View file

@ -673,6 +673,10 @@ class DomainConfigPanel(ConfigPanel):
1 if self.entity == _get_maindomain() else 0 1 if self.entity == _get_maindomain() else 0
) )
# Portal settings are only available on "topest" domains
if _get_parent_domain_of(self.entity, topest=True) is not None:
del toml["feature"]["portal"]
# Optimize wether or not to load the DNS section, # Optimize wether or not to load the DNS section,
# e.g. we don't want to trigger the whole _get_registary_config_section # e.g. we don't want to trigger the whole _get_registary_config_section
# when just getting the current value from the feature section # when just getting the current value from the feature section
@ -748,7 +752,7 @@ class DomainConfigPanel(ConfigPanel):
# "portal_logo", # "portal_logo",
"portal_theme", "portal_theme",
] ]
if any( if _get_parent_domain_of(self.entity, topest=True) is None and any(
option in self.future_values option in self.future_values
and self.new_values[option] != self.values.get(option) and self.new_values[option] != self.values.get(option)
for option in portal_options for option in portal_options