umlclass-diagrammulti-user

Is my class diagram for multi user role based app right?


In my case, each user can be attributed one or multiple roles, some roles require extra attributes (for exp "agent maintenance" role hase "spécialité" field). The "Administrateur" role can add/change roles of other users. if my model works fine, is there any better representation? [piece of class diag](https://i.sstatic.net/D9ieA.png)


Solution

  • Your model is fine:

    However, nothing says that Administrator can change roles of others. There are plenty of ways to represent this, for example foresee in Administrator some operations dedicated to the management of the other proles.