Alfresco如何禁用下载

来源:百度文库 编辑:神马文学网 时间:2024/10/02 23:29:45
 
  • Alfresco.com
  • Developers
  • Forums
  • Forge
  • Blogs
  • Podcasts
  • Contact
The Open Source Alternative for Enterprise Content Management

Alfresco

Support forums for the Alfresco Enterprise Content Management System

Disable Download Action in Alfresco Share 3.3g 

Support questions relating to Alfresco Share
Post a reply4 posts • Page 1 of 1

Disable Download Action in Alfresco Share 3.3g

by cfpatel » 28 Jun 2010, 10:40

Dear Friends ,

I am new to Alfresco using Community Edition 3.3 g .Can any one help me out to disable the download action option while previewing the file from alfresco share. Also give some useful tips to use WebDav with alfresco .

Its Urgent,

Thank You In Advance,
cfpatel
Community Member
 
Posts: 5
Joined: 15 Apr 2010, 08:49
Alfresco Version: 3.2
0 Points (What is this?)
Top

Re: Disable Download Action in Alfresco Share 3.3g

by brauliotrujillo » 16 Jul 2010, 16:08

i don´t know if you still need to disable the download action or if you already found a solution, i had the same issue and after looking everywhere and not finding nothing i decided to give it a try myself and this is what i came up with,

i realized that when you login as admin there is some admin specific actions that no other user can see so i thought there must be a way to do the same for the download action, so whar i did was to look in the xml file containing that behavior, which is "document-actions.get.config.xml" and change the permissions, for example, if i wanted that a user could download the file, i changed his role to collaborator which has "edit" permissions, so i set the download to "permissions=edit" and if i didn´t want the user to be able to download i change the role of the user to contributor or consumer and then they couldn´t see the download action button.

Don´t forget to backup before you do any changes

Here´s a piece of code from the original xml file regarding the download behavior:

Code: Select all




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.

So if you only want user with "Edit" privileges to be able to download files, set the permission as is:

Code: Select all




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.

For added security, if you only want the admin or sitemanager to be able to download, set the permissions to permission="delete", so only users with Delete privileges can download.

Unfortunately, Alfresco Share being such a wonderful collaboration app, it has two other ways of downloading the file, in the Version History there is also a download button, and in the Sharing section you can see the download url for the file, so what i did is to add an <#if user.isAdmin> tag to the document-versions.get.html.ftl.

Here´s the original piece of code regarding the download button, its almost at the end of the file:

Code: Select all

       ${msg("link.download")}
               <#if version_index != 0>
                  ${msg("link.revert")}
               


And this is the code that will only allow the Admin to see that button:

Code: Select all

       <#if user.isAdmin>
               ${msg("link.download")}
       
               <#if version_index != 0>
                  ${msg("link.revert")}
               


Now for the document-links you can do the same to hide the "download file url" and "document url"

Code: Select all

<#if user.isAdmin>
   
   
   
   

<#if repositoryUrl??>
   
   


   <#-- cifs link (N/A)
    -->

   
   


Hopefully i explained myself and maybe i helped with this issue.
brauliotrujillo
Community Member
 
Posts: 6
Joined: 01 Jul 2010, 23:11
Alfresco Version: 3.3
0 Points (What is this?)
Top

Re: Disable Download Action in Alfresco Share 3.3g

by utpal.desai » 13 Sep 2010, 14:18

Thanks it helped me lot....!
utpal.desai
 
Posts: 3
Joined: 13 Sep 2010, 14:16
Alfresco Version: 3.3
0 Points (What is this?)
Top

Re: Disable Download Action in Alfresco Share 3.3g

by utpal.desai » 14 Sep 2010, 15:45

I am able to disable all the options to save pdf on to desktop, I am not able to search in swf viewer.
utpal.desai
 
Posts: 3
Joined: 13 Sep 2010, 14:16
Alfresco Version: 3.3
0 Points (What is this?)
Top

Post a reply4 posts • Page 1 of 1

 

Return to Alfresco Share

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Alfresco Home | Legal | Privacy | Accessibility | Site Map | RSS 

© Alfresco Software, Ltd, All Rights Reserved