Extends IContent with some convenient methods.
Assembly: EPiServer.Cms.AspNet.dllVersion: 11.20.7
public static class IContentExtensions
Return the access level that the current user has to the content
public static AccessLevel QueryAccess(this IContent content)
Note that this method also checks the published status of the page to determine the actual access that the user has. I e if the page is not published the user will not see it unless he has "more" access than Read.
Check for a distinct required access level. This is preferred to use over QueryAccess for performance reasons.
public static bool QueryDistinctAccess(this IContent content, AccessLevel requestedLevel)
The requested level.
true if at least the requested access is held by the current user
This method is optimized for speed, by checking preconditions before calling expensive methods.