Roundcube Community Forum

Release Support => Release Discussion => Topic started by: medorex on July 13, 2022, 09:46:51 AM

Title: disable or hide encryption from preferences
Post by: medorex on July 13, 2022, 09:46:51 AM
Good morning, what is the correct elements.actions combination for hide the encryption setting in preferencies?
i have made many try by adding $config['disabled_actions'] = ['...'] in config.inc.php but apparently nothing work, any ideas?
thanks
Medo
Title: Re: disable or hide encryption setting
Post by: JohnDoh on July 13, 2022, 01:34:59 PM
To prevent users from overriding specific settings you should add the name of the config variable in the `$config['dont_override']` array.  For example 'skin' prevents the user from being able to change skin.

The `$config['disabled_actions']` var removes UI element for example if you wanted to hide the message import button on the mail screen you would put 'mail.import-messages' in the array. That is the task the action is in, a period and then the name of the action. Some actions are global and do not require a task to be specified.
Title: Re: disable or hide encryption setting
Post by: medorex on July 14, 2022, 07:17:16 AM
I need to use $config['disabled_actions'] array, because i dont want recieve question like "what is encryption?" from my dear colleagues...
Where i can find a list of task and actions?
I have try:
$config['disabled_actions'] = ['settings.encryption'];
$config['disabled_actions'] = ['preferences.encryption'];
$config['disabled_actions'] = ['options.encryption'];
but dont work, where is the mistake?
Thanks a lot JohnDoh
Medo
Title: Re: disable or hide encryption from preferences
Post by: JohnDoh on July 16, 2022, 03:24:19 AM
To remove and entire section from the settings list you have to disable all the options in that section. By default the Encryption section only has 1 option so it would look like:
Code: [Select]
$config['dont_override'] = ['mailvelope_main_keyring'];
Title: Re: disable or hide encryption from preferences
Post by: medorex on July 18, 2022, 04:57:39 AM
Thanks JohnDoh, alternatively i could have commented ../program/action/settings/index.php from row 1443 to 1475, or is it better to use your method anyway?
thanks, bye
Medo
Title: Re: disable or hide encryption from preferences
Post by: beetecaste on January 16, 2023, 07:37:07 AM
To prevent users from overriding specific settings you should add the name of the config variable in the `$config['dont_override']` array.