Limit people finder results to Site Colleagues ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 09:19 AM
Hello,
i'm trying to manage the access-rights in Share and i stumbled upon a problem within the people finder. A user can search for every person within Share, be it a site colleague or not. This is a bit problematic since there may be users which shouldnt be visible to each other (e.g. competitors).
How can i solve this issue to limit the search results to display ONLY the people within the users Site(s)?
regards,
Volker
i'm trying to manage the access-rights in Share and i stumbled upon a problem within the people finder. A user can search for every person within Share, be it a site colleague or not. This is a bit problematic since there may be users which shouldnt be visible to each other (e.g. competitors).
How can i solve this issue to limit the search results to display ONLY the people within the users Site(s)?
regards,
Volker
Labels:
- Labels:
-
Archive
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2010 06:31 AM
The People Finder calls the repository service: /api/people?filter={filterQuery}
This service is implemented by the webscript defined in: people.get.desc.xml. So you would need to change the People Finder component client-side javascript to call a different (or overridden) webscript to perform a different search. I think you will need to implement your own repository side search that constrains the results to users within site groups that are appropriate for the current user.
Hope this helps,
Kev
This service is implemented by the webscript defined in: people.get.desc.xml. So you would need to change the People Finder component client-side javascript to call a different (or overridden) webscript to perform a different search. I think you will need to implement your own repository side search that constrains the results to users within site groups that are appropriate for the current user.
Hope this helps,
Kev

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2010 04:10 AM
thanks for your tip, kev. I'm thinking about another approach: Is it possible to hide the complete people search for users with a specific role, for instance "consumer"? Where/How can i handle the Accessibility of GUI elements for different User Roles?
-Volker
-Volker

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2010 05:01 AM
Yes this can be done quite easily. The REST API to retrieve the current user site memberships is used often in our components, for example in members-bar.get.js:
The json object returned contains the site membership details for the given user in the give site.
You could then block out areas of the page with an appropriate #if statement in the freemarker etc.
Kev
var json = remote.call("/api/sites/" + page.url.templateArgs.site + "/memberships/" + encodeURIComponent(user.name)); if (json.status == 200) { obj = eval('(' + json + ')'); }
The json object returned contains the site membership details for the given user in the give site.
You could then block out areas of the page with an appropriate #if statement in the freemarker etc.
Kev

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2010 11:49 AM
Thanks!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2011 02:15 AM
Hello,
Thanks for the post above, but the information is a bit to limited for me.
How do I put together the REST API call and the Freemarker file?
Does anyone have a code example?
With kind regards,
Remco
Thanks for the post above, but the information is a bit to limited for me.
How do I put together the REST API call and the Freemarker file?
Does anyone have a code example?
With kind regards,
Remco
