Let's say I have different functionalities/roles the admin can give to the users of their choice, so there is no "if the user can do this they can't do that". Example : I have the roles : read, add , delete and edit. The admin can assign these roles to his/her users, let's say randomly (for the lack of a better word). Can this be illustrated in use case diagram or I should just use one actor and give him all these actions ? If it can be done then how ? And I am not familiar with all UML diagrams but I would be thankful if someone knows a better diagram where this can be illustrated better!
Well first off, it's generally better to give your roles nouns for names rather than verbs. Just makes things clearer. So read er , add er , etc.
In terms of use cases, I'd say create one use case for "assign role to user", with admin as the actor. You probably don't need four separate use cases unless the processes involved in adding the different roles are radically different from one another.
Then, create "read stuff", "add stuff", etc with reader and adder, respectively, as actors.
In your descriptions of the reader and adder actors, make it clear that these are users which have been assigned the respective roles. If you like, they can inherit from a more generic "user" actor, but whether that's motivated in your case I can't tell from this question alone.
That's all you need to do, really.
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.