04-11-2017 05:59 AM
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.
04-11-2017 06:15 AM
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.
04-11-2017 08:36 AM
04-11-2017 09:05 AM
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.
04-11-2017 09:44 AM
OK, thanks for your replies !
04-11-2017 02:41 PM
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:
Regards.
--C.
04-12-2017 06:23 AM
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 ?
04-13-2017 03:01 PM
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.
04-14-2017 10:43 AM
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 ?
04-14-2017 11:39 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.