Skip to content

Commit

Permalink
don't show preview button if file is restricted #6919
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Oct 29, 2020
1 parent 3e71d96 commit 505682b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/webapp/filesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
<ui:param name="canUpdateDataset" value="#{DatasetPage.canUpdateDataset()}"/>
</ui:include>
</ui:fragment>
<ui:fragment rendered="#{DatasetPage.isShowPreviewButton(fileMetadata.dataFile.id)}">
<ui:fragment rendered="#{DatasetPage.isShowPreviewButton(fileMetadata.dataFile.id) and not fileMetadata.restricted}">
<a class="btn-preview btn btn-link bootstrap-button-tooltip" title="#{bundle.preview}"
href="#{widgetWrapper.wrapURL('/file.xhtml?'.concat(!empty fileMetadata.dataFile.globalIdString ? 'persistentId=' : 'fileId=').concat(!empty fileMetadata.dataFile.globalIdString ? fileMetadata.dataFile.globalIdString : fileMetadata.dataFile.id).concat('&amp;version=').concat(fileMetadata.datasetVersion.friendlyVersionNumber))}">
<span class="glyphicon glyphicon-eye-open"/><span class="sr-only">#{bundle.preview}</span>
Expand Down

0 comments on commit 505682b

Please sign in to comment.