[Cubicweb] WFHistoryVComponent show/hide
carlos.balderas at gmail.com
Tue Nov 29 07:00:54 CET 2011
I am trying to hide the workflow history component in views for anonymous
users and I thought unregistering the component "WFHistoryVComponent" could
be the way to go in this case. e.i.
from cubicweb.web.views.workflow import WFHistoryVComponent
# this will fail if the component is already registered!!
In this case I supposed I need to register again the components for logged
users, so they can see it again, but I am not sure that playing around with
register and unregister methods is the correct thing to do in this case.
The other option I think could be to overwrite the method
"content_navigation_components" where all the components of the view are
read and sent to render, then make the proper validation when the user is
anonymous to avoid displaying the WFHistoryVComponent.
Do you think that one of those options are correct to get the right
solution of my case?
Thank you very much.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cubicweb