Hi all,

I've been working on incorporating acegi with our project, and with the useful addition of the after invocation stuff that ben added recently, this will help with methods that need to return a collection of objects, each of which need to be inspected for security access.

however, im curious if how (if anyone) has approached doing something like this.

public List getListOfItems(int firstResult, int size) {
...
}

The issue I see here is that if I request a list that is 10 items, starting at row one, the method will fetch items 1-10 from the database, then in post invocation, potentially some, or all will be knocked out by the security framework. So the end result would be possibly ten or more likely less than 10 items. And a programmer using the above method would not receive what he/she had been expecting.

So I see a few possible workarounds.. like fetching the next consecutive resultset if some items are knocked out of the original result, and repeating it until we have the desired size - maybe to make things more effiicent, to always fetch a slightly larger set, like 150% more (just a number i picked off my head), so that way a successive fetch would be less likely, or what.

I thought I'd query the list for any ideas/suggestions before I went ahead with this.

-tim

Reply via email to