开发者

Can User have more than one roles in asp.net

开发者 https://www.devze.com 2022-12-25 18:51 出处:网络
I\'m developing a web application I want to use the role authentication to cont开发者_JAVA百科rol different parts of the website accessibility. But my problem is say I implemented a upload and downloa

I'm developing a web application I want to use the role authentication to cont开发者_JAVA百科rol different parts of the website accessibility. But my problem is say I implemented a upload and download functionality on one of the page and I want to have the ability to control a user whether they can either upload or download; or both. So, I'm not exactly sure if the role base authentication can support a user with more than one role to work the way I want it.


yes, user can have multiple roles and can be check weather a user have particular role like..

if (HttpContext.Current.User.IsInRole("Admin"))
0

精彩评论

暂无评论...
验证码 换一张
取 消