Adding HasPermission check to avoid this issue would mean changing the way the AuthorizationProvider::TextReaderForTopic behaves. Instead of using the AssertTopicPermission, which creates the FlexWikiAuthorizationException if the call to HasPermission fails, there would just be a call to HasPermission that would return null if the HasPermission call failed. Similar changes may also be required for GetParsedTopic, but I think this is unlikely as the first call should always be to TextReaderForTopic (he hopes).
Is this analysis correct? I can run tests Sunday while watching the F1 race on myPVR. John Davidson On 9/29/07, Nathan Jones <[EMAIL PROTECTED]> wrote: > On 9/29/07, Craig Andera <[EMAIL PROTECTED]> wrote: > > Well, you can call HasPermission for every topic, and not attempt operations > > on which you don't have Read. It adds overhead of its own, of course, but > > probably not a ton - HasPermission is cached both at the per-request and at > > the topic level. Using the usual 1000x exception rule of thumb, it's > > probably worth it most of the time. > > > > > > I'm not sure what the 1000x exception rule of thumb is, but with heavy > use of authorization on "select *" type wikitalk statement, I'd say > that you could end up with more exceptions than not. I worry that this > will end up causing performance problems. > > Think about the numbers that John found.... 50 ms per exception on > wikitalk that selects just 20 pages (which is just plain tiny) can add > a full second. That seems like way too much to ignore. I think that > the HasPermission check would be better for the average case. > > I, of course, have no numbers to back this up, just some experience at > having made this exact mistake before. > > -nathan > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Flexwiki-users mailing list > Flexwiki-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flexwiki-users > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flexwiki-users mailing list Flexwiki-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flexwiki-users