Determines whether the specified principal has the requested access.

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

Syntax

C#
bool HasAccess(
	IPrincipal principal,
	AccessLevel access
)

Parameters

principal
Type: System.Security.Principal..::.IPrincipal
The principal to authorize.
access
Type: EPiServer.Security..::.AccessLevel
The requested access level.

Return Value

true if the specified principal has access; otherwise, false.

Remarks

Note that the access level is a bitmask, i e we simply check that all specified access types are granted to the principal.

See Also