Click or drag to resize
UserSecurityHelperIsAuthorizedPerResource Method
Checks whether the user is authorized for given resource name and permission, returns true if so.

Namespace: CMS.Membership
Assembly: CMS.Membership (in CMS.Membership.dll) Version: 11.0.0
Syntax
C#
public static bool IsAuthorizedPerResource(
	string resourceName,
	string permissionName,
	string siteName,
	UserInfo userInfo,
	bool exceptionOnFailure = false
)

Parameters

resourceName
Type: SystemString
Resource name
permissionName
Type: SystemString
Permission name to check
siteName
Type: SystemString
Site name
userInfo
Type: CMS.MembershipUserInfo
User to check
exceptionOnFailure (Optional)
Type: SystemBoolean
If true, PermissionCheckException is thrown whenever a permission check fails

Return Value

Type: Boolean
Exceptions
ExceptionCondition
PermissionCheckExceptionThrown when permission check fail and exception is allowed by exceptionOnFailure parameter.
See Also