Reputation: 1167
This is the scenario
The system has two main users the SYSTEM USER and END USER. An end user is further divided into two users named CLIENT USER and INTERNET USER, client user is associated in database accessible account while internet user is not.
All users are classified into different ROLES, And each role is associated with a set of accessible MODULES, and different modules contain different FUNCTIONS like view, add, edit and delete functions.
Different roles may be associated with different functions in modules. Sample Super Admin role may access and do add edit delete function in user access module while Power User may only access it or view it.
When User logs-in the security service would authenticate the user with username and password. If it is authenticated, it will look up the roles associated with the user and display the granted modules on screen for users to select for access.
I have created a simple class diagram containing the fields or attributes per class, I am just not sure if it is correct, like the connectors or relationship implemented, the cardinality and the methods per class, I have only input the method for one class and that is for login (login()) method.
Upvotes: 4
Views: 9777
Reputation: 13711
I can see a couple of things wrong with your model:
Upvotes: 4
Reputation: 1789
I would do something like that :
You get users who can login and who have different roles, when you execute a function (renamed service), the Service gets its module and request the module to check if the session user has the right to execute the Service.
Does this help you ?
Upvotes: 1