ISecurity.GetCurrentUserAccessToResource

Returns the access level the current user has for the specified resource.

public AccessRights GetCurrentUserAccessToResource(string resourceID,
	string resourceName,
	AccessRights defaultAccess);

Return Value

The access level for the current user for the specified resource.

Parameters

resourceID
The identifier (Guid or Name) of the resource to check.

resourceName
The name of the resource.

defaultAccess
The default access level to use if no access was found.

Remarks

GetCurrentUserAccessToResource returns AccessRights.Full if the current user is in the Administrator role. If there's no record for the specified role in the Permissions table, the specified default access is used.

Overloads:


See also:

Interface ISecurity