実際の github プロジェクト ページのkristoffer-ahlの助けを借りて、これを解決できました。
ここに解決策があります
public static bool ActionIsAllowedForUser(string area, string controllerName, string actionName)
{
var configuration = SecurityConfiguration.Current;
string fullControllerName = string.Format("Web.Controllers.{0}Controller", controllerName);
if (!string.IsNullOrEmpty(area))
{
fullControllerName = string.Format("Web.Areas.{0}.Controllers.{1}Controller", area, controllerName);
}
var policyContainer = configuration.PolicyContainers.GetContainerFor(fullControllerName, actionName);
if (policyContainer != null)
{
var context = SecurityContext.Current;
var results = policyContainer.EnforcePolicies(context);
return results.All(x => x.ViolationOccured == false);
}
return true;
}