I think what’s happening here is that your canView() will fire late in the pipeline - in this case, probably only when it’s time to render the row. The underlying DataList will contain all of your
Business objects, so the ‘total’ count will show 2 instead of 1.
If that’s true, this bug will probably be more severe once you have more records, because I would expect that if you had many pages of records and your user was only allowed to see a handful of them, they may see an empty result set initially (but it would say e.g. page 1 of 10) and have to click ‘Next’ a few times before they get a page with one or more visible records.
It’s probably not a bug (or at least not an easy one to fix) because the overhead of properly filtering the list by firing the canView() method on every item in the DataList could be enough to crash a server, depending on how many items are in the unfiltered list.
To get around this you probably want to hack your ModelAdmin a bit. I can’t remember the API, but I think you can override e.g.
GetRecords() (not called that but you get the idea) and you could implement your business logic there so you get a DataList that only contains the records that user should see.