修复后台授权问题,调整后台列表批量操作例子

This commit is contained in:
2020-07-15 19:21:57 +08:00
parent edefa34898
commit 3f993c838f
10 changed files with 196 additions and 133 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ namespace COMCMS.Web.Common
/// <summary>
/// 后台授权过滤器
/// </summary>
public class MyAuthorizeAttribute : ResultFilterAttribute
public class MyAuthorizeAttribute : Attribute, IAuthorizationFilter
{
/// <summary>
/// 菜单key
@@ -35,7 +35,7 @@ namespace COMCMS.Web.Common
_returnType = !string.IsNullOrWhiteSpace(returnType) && returnType.ToLower() == "json" ? "JSON" : "HTML";
}
public override void OnResultExecuting(ResultExecutingContext context)
public void OnAuthorization(AuthorizationFilterContext context)
{
bool isOK = false;
if (Admin.IsAdminLogin())
@@ -89,7 +89,7 @@ namespace COMCMS.Web.Common
}
}
}
base.OnResultExecuting(context);
//base.OnResultExecuting(context);
}
}
}