Try our conversational search powered by Generative AI!

Fetch all Visitor Groups that can access a specific content

Vote:
 

I could fetch all visitor groups and also visitor groups that a user belongs to. 

However I have a requirement, that when a user visits a page, I need to show who all (visitor groups) can see the page. Couldn't find anything online through which I can fetch this data.

Thanks.

#227100
Aug 27, 2020 13:38
Vote:
 

Hi Dileep 

Does this help? It shows all visitor groups used on the page, also all visitor groups that are used on content on the page too.

https://www.david-tec.com/2017/11/visitor-group-usage-viewer-for-episerver-10/

David

#227101
Aug 27, 2020 16:26
Vote:
 

This seems to be a good thing but I am not sure if it serves my purpose.

I need to show the list of visitor groups that have access to a page (content) when that page is viewed by user in front end. This is to let people be aware of all groups that can view that content.

I am already fetching list of visitor groups, also can fetch visitor groups that a user has access to but not the list of visitor groups that can see the page irrespective of logged in user.

#227102
Aug 27, 2020 19:00
Vote:
 

If you are using visitor groups to control access to a page then this will be set in the AccessControlList (ACL). Just to confirm you mean visitor groups and not roles as defined in the admin UI?

Either way you can get hold of the AccessControlList using the ACL property of the page which gives you the roles and visitor groups that have access to content. From here you can work out the roles/visitor groups that have access to content. 

David

#227138
Aug 28, 2020 9:31
Vote:
 

Perfect. ACL was exactly what I was looking for. Big Thanks.

#227157
Aug 28, 2020 13:37
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.