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.
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.
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.
OK, thanks for your replies !
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.
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 ?
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.
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 ?
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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.