Roundcube Community Forum
News and Announcements => General Discussion => Topic started by: nullrequest on January 11, 2021, 08:24:23 PM
-
I want to be able to enforce certain system-wide preferences for all uses, regardless off what they try to set for customized values.
I've tried putting entries into the config.inc.php , however, those don't seem to be permanently enforced but instead are initial default values.
//////////////////////////////////////////////
// ----------------------------------
// USER INTERFACE
// ----------------------------------
//
// 2021-01-09 - setup to force default sorts to speed up login delay
//
// default messages sort column. Use empty value for default server's sorting,
// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
$config['message_sort_col'] = '';
// default messages sort order
$config['message_sort_order'] = '';
Ultimately, I'm trying to automatically remove the custom column sorts users create because they cause login to my server to be extremely slow and cause the IMAP to unload all messages b/c it does not support the "SORT" command (see issue here (https://www.roundcubeforum.net/index.php/topic,28759.msg73406.html)). Ideally, this plugin would run at logout/login to remove custom sorting, significantly speeding up the login process.
-
You can disabled UI actions in the config.
// List of disabled UI elements/actions
$config['disabled_actions'] = [];
-
I think all you need is to add these options to dont_override list in config.
-
Well, @alec - your suggestion works. I was hoping to still allow sorting during the user's session and return the value to default at logout, but it's not a show-stopper. With the following snippet in my config, users can't sort on any columns, but the login process is **WAY** faster than before, which is a much bigger deal than sorting!
Thanks for the suggestion!
//////////////////////////////////////////////
// ----------------------------------
// USER INTERFACE
// ----------------------------------
// default messages sort column. Use empty value for default server's sorting,
// or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
$config['message_sort_col'] = '';
// default messages sort order
$config['message_sort_order'] = '';
$config['dont_override'] = array('message_sort_order','message_sort_col');