I have defined several restrictions for pages in CMS.
I am having a list of ContentReferences of the pages.
How can I get their restrictions programmatically?
Note: I do not need to pass a user and check whether that user has access to that page or not, instead I need to know what are the restrictions defined for a particular page using ContentReference.
Restrictions? Like this?
EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance<IContentSecurityRepository>().Get(ContentReference.StartPage).Entries;
@Tomas Hensrud Gulla yes. That's what I was looking for. Thanks !!
I have defined several restrictions for pages in CMS.
I am having a list of ContentReferences of the pages.
How can I get their restrictions programmatically?
Note: I do not need to pass a user and check whether that user has access to that page or not, instead I need to know what are the restrictions defined for a particular page using ContentReference.