How to restrict public access to document shared by external link ?

cancel
Showing results for 
Search instead for 
Did you mean: 
benjamindupont
Member II

How to restrict public access to document shared by external link ?

Hi there,

Currently, when I want to directly access to a document with a shared link, I don't need to be logged for accessing to the preview and download it. It's big security hole for me, because I don't want anybody can access to document if he have the link.

Do you know how can I restrict the access to document, for only logged users ?


Thanks in advance.

11 Replies
afaust
Master

Re: How to restrict public access to document shared by external link ?

Simply do not use the shared links in this case. These will always be public - that is the whole point. Use permissions on the document itself to manage access for logged in users.

benjamindupont
Member II

Re: How to restrict public access to document shared by external link ?

Thanks for your quick reply. Too bad that we can't manage this...

So, I've 2 questions :

- Like it's mentionned in this thread : is there a way to know which files are shared ?

- In the user's rights, can we manage the right to have or not the shared button ?

afaust
Master

Re: How to restrict public access to document shared by external link ?

 As an administrator / power user you can certainly perform a query for shared documents. They should all have a very specific aspect applied (don't know the name right now).

There are no default permissions regarding public sharing links that can be assigned to / revoked from users to limit this functionality. If a user can see the document they can share it. Typically, in most of the Alfresco projects I have worked in we completely remove these social features from the document library.

benjamindupont
Member II

Re: How to restrict public access to document shared by external link ?

OK, thanks for your replies !

cesarista
Customer

Re: How to restrict public access to document shared by external link ?

Hi Benjamin:

To know which files are shared you can type in Alfresco search --> ASPECT:'qshare:shared'

You can use this search for example with the help of a smart folder:

How to manage public content in Alfresco with the help of virtual folders - Virtual Folders for deal... 

Regards.

--C.

benjamindupont
Member II

Re: How to restrict public access to document shared by external link ?

Hi Cesar,

Thanks for your reply. I try to search with the alfresco share search bar but it doesn't return anything... And I try with the smart folder but there is the same result... Do you have an idea why I don't have any result ?

cesarista
Customer

Re: How to restrict public access to document shared by external link ?

It should give results, if you have content with public urls (shared). The smart folder does similar search queries. If you can not find anything maybe you have problems with your indices...

Regards.

--C.

benjamindupont
Member II

Re: How to restrict public access to document shared by external link ?

Hi Cesar,

You're true, I had troubles with SOLR which did'nt work anymore... Anyway I fixed the problem after performing a full reindex, and the search / smart folder works again ! Thanks !

Now, I would like to unshared all of my documents (and I have like hundreds...). Do you have an idea how can I (simply) do that ?

cesarista
Customer

Re: How to restrict public access to document shared by external link ?

Hi Benjamin:

If you have the Javascript Console installed in your Alfresco server you may run something like:

var nodes = search.luceneSearch('ASPECT:"qshare:shared"');

var count = 0;

for each(var node in nodes) {
   count = count + 1;
   logger.warn(count + ": "+node.displayPath+"/"+node.name);
   logger.warn("This public url is expired --> "+node.properties["cm:to"]);
   node.removeAspect("qshare:shared");
   node.save();
}
logger.warn("Done.");

This will work if you have < 10k nodes. If you have more than 10k, you may run it the number of times that you need.

If you don't have JS Console, you can run it with the help of a dummy rule, or via Alfresco Explorer if you are in Alfresco 4.

Regards.

--C.