• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Role control of web-based administration system and other things

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I am going to build a small web-based administration system using jsp and mysql,which can be used for different people,from manager to ordinary staff.everyone has its own right to do its own thing.

Say,the manager has whole rights.He can do anything he likes,like add new people,arrange rights,delete people,and so on.Meanwhile,the ordinary staff could only obey the rihgts entitled by the manager.

Does anybody has some experience in this area? How to achieve this goal?
Any ideas is welcome!
Plus,if I wanna build a robust system,is there any good book ?

Thanks very very much!
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've set up a number of systems with role-based activity.

Generally I set things up as follows:

I define a series of "permissions" regarding activites that can be performed. For example: "can add this", "can delete that", "can do the other thing".

The I set up roles, each of which is basically a set of permissions. "admin" has all permissions, "gold subscriber" may have most permissions, "basic subscriber" has fewer, and "peon" may have very few, etc...

When a user logs in, his set of permissions is determined by his assigned role or roles (I usually have this all database-based) and made available to both the presentation layer as well as the model. (See this article for some insight on how I set this up for the presentation layer).

It's important to remember that there are at least two prongs to this:

1) Adjusting the UI to only show available activities (you don't want to display a Delete button to a user who has no permission to delete the current item).

2) Disallowing users from performing actions that they do not have the permission for in the back-end code.

Note: just hiding the Delete button from the user is not sufficient security. Your back-end code must also perform the check before carrying out the action.
[ July 08, 2006: Message edited by: Bear Bibeault ]
reply
    Bookmark Topic Watch Topic
  • New Topic