Closed soleofthesea closed 4 months ago
this cannot be solved with permissions. what you want is to hide the "download" menu entry. this is possible and described in https://github.com/rejetto/hfs/blob/main/dev-plugins.md you can add this in admin-panel > custom html > before header
<script>
HFS.onEvent('fileMenu', ({ entry, menu }) => {
const index = menu.findIndex(x => x.id === 'download')
if (index >= 0)
menu.splice(index, 1)
})
</script>
in no way this prevents the user from saving the pdf he's viewing.
In the admin panel I have set in the root 'Who can download' to "No-one" and both "Who can see" and "Who can list" to "Any account (login required)". All subfolders use inherited permissions.
However when attempting to view any file it just throws 'missing permission'.
I'm aware it's basically impossible to actually make it so one can only view but not download files, so to clarify I'm mainly using HFS to browse various PDF files in Chrome when I'm away from home, so I wish for the front end to only expose 'Open' in the menu.