Roundcube Community Forum

 

it's possible show/hide toolbar buttons for users?

Started by pedro4550, August 31, 2014, 08:21:18 PM

Previous topic - Next topic

pedro4550

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!

JohnDoh

i think it depends on which actions you mean but in git-master there is a new option:


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


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

pedro4550

i found a solution,

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


...
<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


pedro4550

Quote from: JohnDoh 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:


// 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?

JohnDoh

Quote from: pedro4550 on September 07, 2014, 06:39:31 PM
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:


// 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...