Hi,
I have the following scenario (requirement in the specification).
I have implemented a web interface to create a new user in the system. Now each user can have different roles which can be selected by HTML checkboxes.
The fact is that each role (checkbox) specifies which
jsp pages in the system can be accessed.
E.g. if the checkbox with the role "0" is selected the user can "view" the tools.jsp and tools2.jsp pages.
if the checkbox with the role "1" is selected then the user can "view" users.jsp.
If both checkboxes "0" and "1" are selected then the authenticated user can view tools.jsp, tools2.jsp and users.jsp.
In my database I have a users table which is used to retrieve the role. I only have 1 column in the database for the role.
What is the best way to implement this scenario?
Shall I assign different role names for each possible value e.g. checkbox1 selected and checkbox2 unselected = 0, checkbox1 unselected and checkbox2 selected = 1, checkbox1 unselected and checkbox2 unselected = 2, etc.?
Thanks for any advice and help.