简体   繁体   中英

Authorization frameworks for HTML?

I have an MVC website with RazorView, where I have hundreds of html elements. I wanted to enable or disable some fields,allow or deny edit on some text fields ..etc.. Is there any javascript framework that I can use? Or what is the best approach to implement element level authorization? Thanks in advance.

Even if you check permissions on client side (Javascript), you have to validate it on server site. Otherwise, it could be possible to manipulate a request and fill fields where you don't have permissions.

So I can't advise a framework which matches your question, but make sure you proof data on server side also - no matter what you're using on client side.

Thus, a solution might be to hide fields (serverside template) where a user has no permission.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM