06-28-2010 06:40 AM
07-16-2010 12:08 PM
<action type="simple-link" id="onActionDownload" href="{downloadUrl}" label="actions.document.download" />
<action type="simple-link" id="onActionView" href="{viewUrl}" label="actions.document.view" />
<action type="simple-link" id="onActionDetails" permission="edit" href="{editMetadataUrl}" label="actions.document.edit-metadata" />
Note that "onActionDownload" which is the download action, and "onActionView" which is the view in browser action, don´t have a permission so everybody can see it, on the other hand, "onActionDetails", which is the "Edit Metadata" action have permission=edit", only user with editing privileges ( Admin, SiteManagers and Collaborators ) can see that action button.
<action type="simple-link" id="onActionDownload" permission="edit" href="{downloadUrl}" label="actions.document.download" />
<action type="simple-link" id="onActionView" permission="edit" href="{viewUrl}" label="actions.document.view" />
<action type="simple-link" id="onActionDetails" permission="edit" href="{editMetadataUrl}" label="actions.document.edit-metadata" />
This way not only they won´t be able to download it but also they will not be able to see it in the browser and easily make a copy from there. There´s several lines in the same xml file regarding download and view, so change them all. You will have to do the same for the folder-actions.get.config.xml.
<div class="actions">
<span><a href="${url.context}/proxy/alfresco${version.downloadURL}" class="download">${msg("link.download")}</a></span>
<#if version_index != 0>
<span><a id="${args.htmlid}-revert-a-${version_index}" class="revert" href="#">${msg("link.revert")}</a></span>
</#if>
</div>
And this is the code that will only allow the Admin to see that button:
<div class="actions">
<#if user.isAdmin>
<span><a href="${url.context}/proxy/alfresco${version.downloadURL}" class="download">${msg("link.download")}</a></span>
</#if>
<#if version_index != 0>
<span><a id="${args.htmlid}-revert-a-${version_index}" class="revert" href="#">${msg("link.revert")}</a></span>
</#if>
</div>
<!– download link –>
<#if user.isAdmin>
<div id="${args.htmlid}-download" class="hidden">
<div class="url-title"><label for="${args.htmlid}-download-url">${msg("document-links.download")}</label></div>
<input id="${args.htmlid}-download-url" class="link-value" />
<input id="${args.htmlid}-download-button" type="button" class="copy-button" value="${msg("document-links.copy")}" />
</div>
<!– document/view link –>
<div id="${args.htmlid}-view" class="hidden">
<div class="url-title"><label for="${args.htmlid}-view-url">${msg("document-links.view")}</label></div>
<input id="${args.htmlid}-view-url" class="link-value" />
<input id="${args.htmlid}-view-button" type="button" class="copy-button" value="${msg("document-links.copy")}" />
</div>
<#if repositoryUrl??>
<!– webdav link –>
<div id="${args.htmlid}-webdav" class="hidden">
<div class="url-title"><label for="${args.htmlid}-webdav-url">${msg("document-links.webdav")}</label></div>
<input id="${args.htmlid}-webdav-url" class="link-value" />
<input id="${args.htmlid}-webdav-button" type="button" class="copy-button" value="${msg("document-links.copy")}" />
</div>
</#if>
<#– cifs link (N/A)
<div id="${args.htmlid}-cifs" class="hidden">
<div class="url-title"><label for="${args.htmlid}-cifs-url">${msg("document-links.cifs")}</label></div>
<input id="${args.htmlid}-cifs-url" class="link-value" />
<input id="${args.htmlid}-cifs-button" type="button" class="copy-button" value="${msg("document-links.copy")}" />
</div> –>
</#if>
<!– page link –>
<div id="${args.htmlid}-page">
09-13-2010 10:18 AM
09-14-2010 11:45 AM
10-15-2010 06:29 PM
10-17-2010 11:49 PM
01-20-2011 03:42 AM
11-09-2011 07:12 PM
11-14-2011 02:33 AM
I want to disable download by default for all consumers but i want also assign download permission to some consumers if my client want.
<action type="simple-link" id="onActionDownload" permission="download" href="{downloadUrl}" label="actions.document.download" />
node.setPermission('DownloadContent', user)
01-12-2012 12:30 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.