ResourceAccessExtensionsHasAccessTo Method
Determines whether the user has access to a given resource.
Namespace: Gemstone.Security.AccessControlAssembly: Gemstone.Security (in Gemstone.Security.dll) Version: 1.0.147 -- Release Build+3014b8a0edc553e56f868ef31b6f0f5012f8db4f
public static bool HasAccessTo(
this ClaimsPrincipal user,
string resourceType,
string resourceName,
ResourceAccessType access
)
<ExtensionAttribute>
Public Shared Function HasAccessTo (
user As ClaimsPrincipal,
resourceType As String,
resourceName As String,
access As ResourceAccessType
) As Boolean
public:
[ExtensionAttribute]
static bool HasAccessTo(
ClaimsPrincipal^ user,
String^ resourceType,
String^ resourceName,
ResourceAccessType access
)
Gemstone.Security.AccessControl.ResourceAccessExtensions.HasAccessTo = function(user, resourceType, resourceName, access);
- 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
BooleanA value indicating whether permission is granted or denied.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).
ArgumentOutOfRangeException | access is not one of:
|