Opened 14 years ago
Make all settings available in fzdefaults.xml
|Reported by:||MBickel||Owned by:|
|Component version:||Operating system type:|
|Operating system version:|
This is an idea developed in the forums (before i found out about you using trac, so my apologies for cross-posting): http://forum.filezilla-project.org/viewtopic.php?f=2&t=4721&p=37693#p37693
From the link:
My idea would be to integrate default options parsing (now in COptions::LoadGlobalDefaultOptions) into COptions::CreateSettingsXmlElement (and probably rename it) so that default values are not determined by the source but by fzdefaults first. For this to work the options array needs to loose the const qualifier, unfortunatly.
The idea here is that t_option.defaultValue gets set from fzdefaults.xml and iff there's no value in fzdefaults.xml then the hardwired defaults take over.
This will probably obsolete the default_options array and associated functions.
Some thought needs to go into saving this options to the configs. Basically i would propose not to create xml nodes for settings set via fzdefaults.xml or just not copy default settings into users setting at all (seems a bit drastic and probably involves more code changes). This way GetXmlValue() calls for values set in fzdefaults will result in a error if the user runs a stock configuration and the default values set in the options array will take over.
I can see concerns about how this will affect expected use of user defined options. But as outlined, the precedence will be like: "filezilla.xml" => "fzdefaults.xml" => "code defaults" so that from a user perspective his config still trumps the admin config.
Maybe there could be a new option to control whether global options take precedence over user options, with it defaulting to "no" to achieve the previous behaviour. But this change is (probably too) invasive.
Benefit: corp admins will love this (i'm in a need to get this behaviour)
If it's needed, i can probably come up with a patch to make this work.
Apologies if the report is not that clear on how i would implement this, but the basic request is: make *all* config options stack like this in order of precedence: filezilla.xml, fzdefaults.xml, code