-
Notifications
You must be signed in to change notification settings - Fork 86
Description
RCMCardDAV 4.4.0 added support to use CardDAV addressbooks from admin presets for the new special addressbooks (collected recipients, trusted senders). This setting is configured by the admin and intended to replace the choice made by the user. Therefore, the documentation also suggests that the admin sets collected_recipients
and collected_senders
as dont_override
options in roundcube, which disables the user from configuring different addressbooks here. If this advice is followed, this issue does not occur.
However, if these settings are left overridable by the user per roundcube configuration, and the user has saved preferences with different addressbooks than the ones chosen by the admin, these settings can override the setting made by rcmcarddav under certain circumstances.
The initialisation of roundcube concerning the configuration roughly follows this sequence:
- The roundcube main configuration is loaded
- When the logged in user is set, the user preferences of the user override the settings in the configuration, except for those that are set as
dont_override
. Thedont_override
options are stripped from the user prefs. - Later, the plugins are initialized, probably in the order as given in the roundcube configuration.
- When RCMCardDAV is initialised, it will set collected senders/receivers addressbooks if configured by the admin.
- Now, if another plugin is initialised after RCMCardDAV and this plugin uses roundcube's
load_config()
function to load its own configuration, the user preferences will again override the settings derived from config files. If the user preferences include settings for either collected senders/receivers, they will overwrite what RCMCardDAV put there. At this point, the exception is that roundcube config settings marked asimmutable
as they were set will keep their values.
Therefore, either dont_override
has to include the collected_senders
/ collected_receivers
settings, or RCMCardDAV can set these settings as immutable settings when setting the admin choices.
I opted for the latter, as it is the simplest solution. Additionally, dont_override
takes effect before the plugin's init()
function is called. It should work from the constructor though, but anyway, immutable seems to be the simpler and more reliable solution here.