Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] Allow custom roles to use image reporting in dashboard #163873

Merged
merged 7 commits into from Aug 15, 2023
Expand Up @@ -82,7 +82,6 @@ export const reportingScreenshotShareProvider = ({
let capabilityHasDashboardScreenshotReporting = false;
let capabilityHasVisualizeScreenshotReporting = false;
if (usesUiCapabilities) {
// TODO: add abstractions in ExportTypeRegistry to use here?
capabilityHasDashboardScreenshotReporting =
application.capabilities.dashboard?.generateScreenshot === true;
capabilityHasVisualizeScreenshotReporting =
Expand All @@ -106,7 +105,11 @@ export const reportingScreenshotShareProvider = ({
return [];
}

if (isSupportedType && !capabilityHasVisualizeScreenshotReporting) {
if (
isSupportedType &&
!capabilityHasVisualizeScreenshotReporting &&
!capabilityHasDashboardScreenshotReporting
Copy link
Contributor Author

@rshen91 rshen91 Aug 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to return an empty array for Dashboard users if they have the right permissions defined in isSupportedType

) {
return [];
}

Expand Down