READ PROTECT and number of results returned + pagination

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

READ PROTECT and number of results returned + pagination

Post by joben »

Lets say I have a query like this:
FIND ALL Car

The items returned are:
Audi
SAAB
Volkswagen
Volvo
Total: 4 items

Lets say I now implement a READ PROTECT rule in the Car BO:

Code: Select all

If Car.MadeIn='Germany' AND LoggedInRegularUser.LikesGermanCars='No' Then 
READ PROTECT Car FROM ALL EXCEPT System AND Administrator
The items returned are:
SAAB
Volvo
Total: 4 items

Not only will the summary say 4 items, the query also activates pagination based on this, rather than how many records were actually returned.

This looks pretty bad if the BO has a lot of records, but no records are supposed to be displayed at all for the LoggedInRegularUser and the summary is completely off and it says you have like... 17 pages.
This currently makes it hard to make multi-tenancy work. The only workaround is to make every query super-specific. Am I missing something fundamental here?

AwareIM v 8.4
Regards, Joakim

Image
Post Reply