UserInfoProviderIsAuthorizedPerResource Method (String, String, String, UserInfo, Boolean) |
Returns true if given user is granted with specified permission.
Namespace: CMS.MembershipAssembly: CMS.Membership (in CMS.Membership.dll) Version: 9.0.0
Syntax public static bool IsAuthorizedPerResource(
string resourceName,
string permissionName,
string siteName,
UserInfo userInfo,
bool exceptionOnFailure
)
Parameters
- resourceName
- Type: SystemString
Resource name - permissionName
- Type: SystemString
Permission name - siteName
- Type: SystemString
Site name - userInfo
- Type: CMS.MembershipUserInfo
User info object - exceptionOnFailure
- Type: SystemBoolean
If true, PermissionCheckException is thrown whenever a permission check fails
Return Value
Type:
BooleanExceptions Exception | Condition |
---|
PermissionCheckException | Thrown when user is not authorized per resource and exceptionOnFailure is enabled |
See Also