Roundcube Community Forum

 

Roundcube hide headers from user

Started by pikington, March 11, 2022, 09:18:45 AM

Previous topic - Next topic

pikington

Hi guys ,

I hope you're all well, I was wondering if it was possible to remove the "headers" button from the users profile?

I don't want them to have the ability to view the headers on the emails which they receive and it have to be administrators to view them

Cheers

JohnDoh

I think you have two choices
1) create a custom skin/extend an existing one and leave they button out of the template
2) use the `render_page` hook to modify the HTML before its sent to the client with something like (for the elastic skin):

if ($args['template'] == 'message') {
  $args['content'] = preg_replace('/<a href="#all-headers" class="headers-all" onclick="return UI.headers_dialog\(\)">(.+?)<\/a>/', '', $args['content']);
}
return $args;

The plugin approach would give you the option to choose which users the button appears for.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...