[Yanel-dev] Always show most recent versions even if toolbar
is not enabled
Michael Wechner
michael.wechner at wyona.com
Sun Feb 8 14:02:39 CET 2009
Guillaume Déflache schrieb:
> 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)?
people who review content can be quite confused if they suddenly see a
toolbar (thinking of the boss of a big company who has no clue about a CMS)
>
>
>> 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.
yes, right now we could change it to
if (!isToolbarEnabled(request)) {
stateOfView = StateOfView.LIVE;
}
BUT IIRC we already has some other usecases in our mind which would lead
to else if ....
>
>
>> 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.
that's a performance issue. Think of many menu entries and all need to
be checked re Access control ...
>
>
>> 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...
me too, but what is the alternative?
Cheers
Michi
>
>
> 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