Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions api/src/org/labkey/api/reports/Report.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,12 @@ enum renderParam implements SafeToRenderEnum
* e.g. This report can run code that runs outside labkey's security context
*/
boolean isSandboxed();

/* Reports that require a redirect (e.g., Sample Finder saved searches) should return false
* to prevent them from causing invalid redirects during web part rendering.
*/
default boolean isShowInReportsWebPart()
{
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected void renderView(Object model, HtmlWriter out) throws Exception
getViewContext().put(Report.renderParam.reportSessionId.name(), properties.get(Report.renderParam.reportSessionId.name()));
}

if (_report != null)
if (_report != null && _report.isShowInReportsWebPart())
{
HttpView view;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

for (Report report : ReportUtil.getReportsIncludingInherited(c, u, null))
{
if (!filter.accept(report, c, u) || (report.getDescriptor().isHidden() && !showHidden))
if (!filter.accept(report, c, u) || (report.getDescriptor().isHidden() && !showHidden) || !report.isShowInReportsWebPart())
continue;

String reportName = report.getDescriptor().getReportName();
Expand Down