2014-08-29 157 views

回答

0

u可以使用PrincipalPermission

這裏樣品如何實現。所有用戶(UserB,UserA,Admin)可以訪問此方法)

[PrincipalPermission(SecurityAction.Demand, Role = "UserB")] 
[PrincipalPermission(SecurityAction.Demand, Role = "Admin")] 
[PrincipalPermission(SecurityAction.Demand, Role = "UserA")] 

public bool Add(Item item) 
     { 

} 
相關問題