Hello Experts,
Is there any easy way to modify the advanced search in such a way that it will retrun results from the user's home cabinet and several other cabinets?
Now it searchs everything in every cabinet.
I think you will have to customize the component.
You can probably restrict the scope of the search query being fired based on your criteria, but for sure its gonna be a customized Advsearch component, I dont think its available OOTB.
You can extend AdvSearchEx, and override buildQuery in your code. Followign is the snippet that adds a folder path in location scope.
@Override
protected IDfQueryBuilder buildQuery()
{
SearchInfo info = getSearchInfo();
IDfQueryBuilder qb = info.getQueryBuilder();
IDfFolder folderObj = (IDfFolder) getDfSession().getObject();
String folderPath = folderObj.getFolderPath(0);
qb.addLocationScope(getDfSession().getDocbaseName(), folderPath, true);
}
Regards,
Muhammad Ali
I want to achieve this without customization. I know that if we remove read permission for dm_world for documents that are created by different users, I can achieve to this goal. The default acls are inherited from user; therefore, I have to change default acl's of users. But, has anyone done such a change in their environment?
Please give me some ideas if you have done something similar.
I can not figure out a way to do this by configuration alone.
Changing repository config, to inheirt ACL from Folder, will get you closer to your goal.
There is no harm in changing user default ACL. Its a good idea to set it to a system defined one to avoid ACL bloat.
Changing the security may give you "similar" effect, but you original post said that you wanted to limit the search to user cabinet AND several other cabinets.
Without customizing search, there is NO guarantee that the result set is limited to these cabinet locations. In other words, if a user or your application, mistakenly gives the user access to the document (it could happen independent of setting dm_world to none), then your users could see the documents in the search results.