[Yanel-dev] Re:
[Yanel-commits] rev 45010 - public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu
Michael Wechner
michael.wechner at wyona.com
Wed Oct 14 16:31:06 CEST 2009
Guillaume Déflache schrieb:
> Michael Wechner schrieb:
>> Guillaume Déflache schrieb:
>>> michi at wyona.com schrieb:
>>>> [...]
>>>
>>> Maybe some helpers could, well, help there, like:
>>>
>>> protected final boolean mayBeViewed(String URI) {
>>> PolicyManager pm = resource.getRealm().getPolicyManager();
>>> return pm.authorize(URI,
>>> resource.getEnvironment().getIdentity(), new
>>> org.wyona.security.core.api.Usecase("view")));
>>> }
>>>
>>> That could be defined in Yanel's Menu base class.
>>
>> done, slightly different though. Please note this can rise
>> performance/scalability issues and I think before we continue
>> using this wildly we first need incremental Menus via Ajax
>
> How so? Could you maybe add a rationale in the javadoc else indeed no
> one will dare to use it and then we could as well not have added it! :/
> Is getting the PolicyManager over and over the issue?
no, I would say checking the policy is the issue. Apache Lenya had
similar issues and I don't want us to go down the same path again re
performance/scalability issues.
On the other hand we need to tackle it at some point and hence I
consider this food for thought.
Cheers
Michi
>
>
>>> Also we should at least try to start a HTML writer library for menu
>>> entries (addMenu, addMenuEntry, addSeparator, etc.), as you
>>> suggested in
>>> http://lists.wyona.org/pipermail/yanel-development/2009-April/003543.html
>>>
>>> (And If we are careful and first use private methods for prototyping
>>> it, we can always ditch it later!)
>>
>> definitely if we find some spare time or reset our priorities ;-)
>
> Well, I guess it's a matter of perspective but I find having to parse
> many times the same code slows everyone even more... and it makes me
> snoozy anyway! ;)
More information about the Yanel-development
mailing list