简体   繁体   中英

How to implement role-based access control Java/MySql?

I am planing to start a web-based project that involves user registrations just like forums/CMS, but my barrier is that I have not idea how to implement the so-called role-based access control.

I googled for "role-based access control" and I found in the results books about: Design Patters.

Is this related to what I need? Is there a tutorial about implementing this idea? Is the implementation on database-side or language programming-side?

Any reference? Any title?

Design your tables such that user can have one or multiple role based on your system

Define your access to pages for group

admin.allowed = .*
user.allowed=/home/.*,/profile/.*

in some properties file

Create a Web Filter that reads the user from session and determines the role and sees if the page it is being requested is allowed if not it redirects to some other page


See Also

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