Author Topic: disable or hide encryption from preferences  (Read 504 times)

Offline medorex

  • Newbie
  • *
  • Posts: 3
disable or hide encryption from preferences
« 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
« Last Edit: July 15, 2022, 03:35:23 AM by medorex »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,731
Re: disable or hide encryption setting
« Reply #1 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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline medorex

  • Newbie
  • *
  • Posts: 3
Re: disable or hide encryption setting
« Reply #2 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

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,731
Re: disable or hide encryption from preferences
« Reply #3 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'];
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline medorex

  • Newbie
  • *
  • Posts: 3
Re: disable or hide encryption from preferences
« Reply #4 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