Multi Level Security via Roles
By Geertjan-Oracle on Jun 23, 2011
I'm simulating a small scenario here for Thomas Edwin who left a comment at the end of my blog entry introducing roles yesterday:
Does it support multiple role login i.e. user has several roles? My requirement is that user's manager can assign several roles to a rolegroup.
Here's the user interface I put together in response to the above, explanation below:
Users can be dragged into one or more roles; roles can be dragged into role groups. When a drop is made into a role group, a new role is created (WindowManager.getDefault().setRole("")). All of the above can only be done by an "admin" user, i.e., the three windows above are only available if the current role is "admin". The "admin" user assigns users to roles, roles to role groups, and then window layouts to role groups.
Then, when the user logs in, they log into a particular role. Depending on the role they log into, a different role group is assigned, which maps to a certain "role" in NetBeans Platform terms, i.e., the related level of security is applied and the related windows open.