EPiServer.Security namespace

Vote:
 

I am unable to get EPiServer.Security.AccessLevel enum? Actually i want to use GetPage to get contents of the page. Getpage has three parameters, last parameter is  EPiServer.Security.AccessLevel but AccessLevel enum is not coming. Any idea?

#55185
Nov 21, 2011 18:56
Vote:
 

Hello,

 

The AccessLevel parameter is depricated from EPi 5 R2 and on. So you have no need for it anyway. If you want to check access you have to do it on the returned PageData object instead.

EPiServer.Core.PageData page = EPiServer.DataFactory.Instance.GetPage(new EPiServer.Core.PageReference(3));

bool hasAccess = page.QueryDistinctAccess(EPiServer.Security.AccessLevel.Read);

#55391
Dec 01, 2011 1:11
* 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.