[Yanel-dev] Always show most recent versions even if toolbar is not enabled

Guillaume Déflache guillaume.deflache at wyona.com
Fri Feb 6 15:35:30 CET 2009


Michael Wechner schrieb:
> Hi

Hi!


> Somebody recently asked me that they would also like to give access to 
> the most recent versions of pages to people who do not have the right to 
> see the toolbar.

Why should people ever be prevented of accessing the toolbar in the 
first place (but see below)?


> Currently this coupled to the toolbar (see YanelServlet)
> 
> private Environment getEnvironment(HttpServletRequest request, 
> HttpServletResponse response) throws ServletException {
>        Identity identity;
>        try {
>            identity = getIdentity(request);
>            Realm realm = map.getRealm(request.getServletPath());
>            String stateOfView = StateOfView.AUTHORING;
>            if (isToolbarEnabled(request)) {
>                stateOfView = StateOfView.AUTHORING;
>            } else {
>                stateOfView = StateOfView.LIVE;
>            }

BTW the "if" branch looks unnecessary here.


> and hence the above request is not possible.
> 
> I think it would actually make sense to implement that people (in 
> particular "pure" reviewers) can also see the "staging" view event it 
> they do not have access to the toolbar.
> 
> WDYT?

I would reformulate that as: it would make sense they only have access 
to certain items in the toolbar menus.


> If yes, how do we be best provide this functionality?
> 
> Also by attaching a flag to the session?

Eek!!! I would be glad we could avoid adding more state...


BTW if you are working on the toolbar I think it would make sense that 
you review my patch in 
http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=6960 before 
it rots... Thanks!

Cheers,
    Guillaume


More information about the Yanel-development mailing list