Author Topic: it's possible show/hide toolbar buttons for users?  (Read 6594 times)

Offline pedro4550

  • Newbie
  • *
  • Posts: 3
it's possible show/hide toolbar buttons for users?
« on: August 31, 2014, 08:21:18 PM »
Hi!

my question is if it's possible show/hide or enable/disable buttons found in toolbar? this is for settings without privileges users accounts ?

sorry for my english!

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Re: it's possible show/hide toolbar buttons for users?
« Reply #1 on: September 02, 2014, 03:11:07 AM »
i think it depends on which actions you mean but in git-master there is a new option:

Code: [Select]
// List of disabled UI elements/actions
$config['disabled_actions'] = array();

which might do what you want.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline pedro4550

  • Newbie
  • *
  • Posts: 3
Re: it's possible show/hide toolbar buttons for users?
« Reply #2 on: September 07, 2014, 06:36:17 PM »
i found a solution,

i edited the file ...\roundcubemail-1.0.2\skins\classic\includes\messagetoolbar.html and i deleted following code lines

Code: [Select]
...
<roundcube:button command="delete" type="link" class="buttonPas delete" classAct="button delete" classSel="button deleteSel" title="deletemessage" content=" " />
...
...
    <roundcube:button command="move" type="link" class="buttonPas move" classAct="button move" classSel="button moveSel" label="move" title="moveto" content=" " data-menu-pos="bottom" />
...

the move button no show and the user will not be able to move messages to the trash

the disadvantage is that i need to edit the file messagetoolbar.html in each skin folder and to all accounts the move button is disabled

I still do not know if activating plugins the user can see the move button


Offline pedro4550

  • Newbie
  • *
  • Posts: 3
Re: it's possible show/hide toolbar buttons for users?
« Reply #3 on: September 07, 2014, 06:39:31 PM »
i think it depends on which actions you mean but in git-master there is a new option:

Code: [Select]
// List of disabled UI elements/actions
$config['disabled_actions'] = array();

which might do what you want.

but I would have to know the button name or button ID

name ID or name button are not dynamic?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Re: it's possible show/hide toolbar buttons for users?
« Reply #4 on: September 08, 2014, 02:40:32 AM »
but I would have to know the button name or button ID

its actually the name of the command that you put in. so based on your previous post you would put:

Code: [Select]
// List of disabled UI elements/actions
$config['disabled_actions'] = array('mail.delete', 'mail.move');

"mail" because its in the "mail" task and then "delete" or "move". see in the template code where it has "command=..." that gives you the command.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…