Introduce a runtime check to ensure that everything that will happen after is done on right bases (structure, permission, etc).
In that step, we focus on Permissions, it means that prior to execute any query there should be a check to ensure that current user has the right to
- Access all projects involved in the query
- Access all trackers involved in the query
- Access all fields used in the search query
- Access all columns displayed in the result
If at least one of the condition is not met, users get an error message telling them their not allowed to see the content for one of the reason above.
To avoid any leak of information, the error message only mention the category of error the user is in (eg "You cannot access all trackers of the search") but doesn't point out which one.