[kupu-dev] Disabling some kupu buttons on some fields but not others for only some roles/permissions

Duncan Booth duncan.booth at suttoncourtenay.org.uk
Fri Nov 3 09:47:33 CET 2006


Peter Simmons <pete-lists at bcmpweb.com> wrote:
> We have a Plone site.
> 
> We want the full capability for Administrators always, we only want some 
> of the buttons (not external link button for example) for Members on 
> that site.
> 
> I was wondering if there was anyway to do this or where I should start 
> looking.
> 
> I guess I am asking are the buttons on kupu configurable by permission?

That is one of the requests which came from the BoF session at the Plone 
conference. It looks like the ability to customise the buttons by 
permission or condition is a common request.

> 
> I confuse I am not even sure of how to override the buttons at all so 
> any help is much appreciated.
> 
Right now, the way to do it is to edit the relevant .kupu files and insert 
tal:condition attributes on appropriate buttons. Then rebuild the widget 
template using 'make'.

I think a longer term solution will be to add another configlet tab which 
lists all of the buttons and lets you select an (optional) permission 
and/or condition for each one. Then change all the of the .kupu stuff to 
query the tool for each button.

I'm not sure when (or if) I can do that: the main problem is actually going 
to be hitting myself over the head enough until I can persuade myself that 
that is *all* the functionality which really needs to be added, and not the 
ability to drag/drop reorder the buttons in the configlet tab, add new 
buttons, edit the associated helptext, ...

Or of course someone else could always do it first.



More information about the kupu-dev mailing list