Description
What are the steps to reproduce your problem?
1. Create a dashboard and save it
2. Open the dashboard and record the response time for the {{/api/share/dashboard/<id>/isAuthorizedToShare}] call
3. Create a significant amount of reports (>1k) not even related to the dashboard
What is the problem?
4. Reload the dashboard => response time increased signficantly
What would be the expected behavior:
The dashboard share authorization check should not be related to the global report count but at most to the report count within the dashboard the check is performed for.
Hints (optional):