Returns the access level for the specified principal.

Namespace:  EPiServer.Security
Assembly:  EPiServer.BaseLibrary (in EPiServer.BaseLibrary.dll) Version: 6.0.530.0

Syntax

C#
AccessLevel GetAccessLevel(
	IPrincipal principal
)

Parameters

principal
Type: System.Security.Principal..::.IPrincipal
The principal to check access against.

Return Value

The access level.

Remarks

Use this method when you want to get the union of all access types granted to this principal. This is most likely only used for display purposes in the user interface. Code that checks access and performs different actions depending on the type of access granted should use the HasAccess method, since it does what you want and has the potential for being much faster.

See Also