摘要:
公司项目的权限写在page基类里,和页面紧耦合,每个页面都要去写下,权限设置,太过麻烦。经过一些实验测试,Attribute和IHttpModule设计权限验证模块,还是比较不错。我们公司的权限模块是写在枚举里的,设计一个Attribute类,里面放这个枚举:[AttributeUsage(AttributeTargets.Class)]public class SystemModuleAttribute : System.Attribute{ public SystemModuleList CurrentPageSystemModule { get; set; }} 在页面的类上面添... 阅读全文
posted @ 2012-04-18 12:03
腐乳
阅读(384)
评论(1)
推荐(0)
浙公网安备 33010602011771号