Skip to content

Commit

Permalink
added another check to the permission logic, where a file with no id …
Browse files Browse the repository at this point in the history
…could be passed to the permission service.
  • Loading branch information
landreev committed Feb 6, 2015
1 parent 3fa8c77 commit 2cc2296
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/webapp/dataset.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@
</a>
</ui:fragment>
<!-- guest book or terms of use, etc. enabled - open "download popup" first: -->
<ui:fragment rendered="#{!(fileMetadata.dataFile.tabularData) and DatasetPage.downloadPopupRequired and (permissionServiceBean.on(fileMetadata.dataFile).has('DownloadFile'))}">
<ui:fragment rendered="#{!(empty fileMetadata.dataFile.id) and !(fileMetadata.dataFile.tabularData) and DatasetPage.downloadPopupRequired and (permissionServiceBean.on(fileMetadata.dataFile).has('DownloadFile'))}">
<p:commandLink id="downloadPopupButton"
styleClass="btn btn-default"
action="#{DatasetPage.initGuestbookResponse(fileMetadata)}"
Expand All @@ -870,7 +870,7 @@
<span class="glyphicon glyphicon-download-alt"/> #{bundle.download}
</p:commandLink>
</ui:fragment>
<ui:fragment rendered="#{fileMetadata.dataFile.tabularData and (permissionServiceBean.on(fileMetadata.dataFile).has('DownloadFile'))}">
<ui:fragment rendered="#{!(empty fileMetadata.dataFile.id) and fileMetadata.dataFile.tabularData and (permissionServiceBean.on(fileMetadata.dataFile).has('DownloadFile'))}">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-download-alt"/> #{bundle.download} <span class="caret"></span>
Expand Down

0 comments on commit 2cc2296

Please sign in to comment.