[Yanel-dev] Re: [Yanel-commits]
rev 45010 - public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/menu
Guillaume Déflache
guillaume.deflache at wyona.com
Wed Oct 14 12:42:02 CEST 2009
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?
>> 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