ResourceAccessExtensionsHasAccessTo Method

Determines whether the user has access to a given resource.

Definition

Namespace: Gemstone.Security.AccessControl
Assembly: Gemstone.Security (in Gemstone.Security.dll) Version: 1.0.170 -- Release Build+ca3065dc8f8b84c59ee38bd3367c3e71f3818071
public static bool HasAccessTo(
	this ClaimsPrincipal user,
	string resourceType,
	string resourceName,
	ResourceAccessType access
)

Parameters

user  ClaimsPrincipal
The user who is requesting access
resourceType  String
The type of resource being requested
resourceName  String
The identity of the requested resource
access  ResourceAccessType
The level of access requested

Return Value

Boolean
A value indicating whether permission is granted or denied.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ClaimsPrincipal. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

See Also