how to prevent site A member from seeing other site member alfresco community

323 views Asked by At

I am using Alfresco community 5.0.d.

I am looking for a way to prevent Site A member's to search for Site B member's & vice-versa followed with other details of 2 different site's.

For instance, siteA members, they should be able to view and select allSites-workflows & siteA-workflows along with that site members. siteB members can only view and select allSites-workflows & siteB-workflows along with that site members.

Thanks in advance!

2

There are 2 answers

0
nikhil84 On BEST ANSWER

Fixed this issued by

  1. Peopler finer component: Overriding the people-finder.js (PATH: /Applications/alfresco-5.0.d/tomcat/webapps/share/components/people-finder/people-finder.js)
  2. Live search: Removed the people suggestion from the live-search.

For modifying the live-search part, refere to stack-overflow answer

Thanks!

4
Muralidharan Deenathayalan On

We had similar customisation in our organaisation. We restricted the users to search only the current members in the workflow assignee field. To achieve this, We passed extra siteid and the search looks only the members from the given site. Here is the example for the people picker for Adhoc workflow.

http://localhost:8080/share/proxy/alfresco/api/forms/picker/authority/children?selectableType=cm:person&searchTerm=adm&size=1000&siteId=mysite

We extended searchUsers method from

org.alfresco.repo.security.authority.script.ScriptAuthorityService

public ScriptUser[] searchUsers(String nameFilter, ScriptPagingDetails paging, String sortBy, String siteName)
   {......
Map<String, String> siteGroups = this.serviceRegistry.getSiteService().listMembers(siteName,nameFilter,null,MAX_RESULTS,true);      
  Set<String> allAuthorities = siteGroups.keySet();
  List<String> authorities = new ArrayList<String>();
  for(String authority : allAuthorities)
  {
     if (!authority.startsWith("GROUP_"))
     {
        authorities.add(authority);
     }
  }
.......
       }

Please let me know, if you need to more help on this.