How to make UML diagram for USER-ROLE with a Organisation - uml

I'm new in UML representation. I couldn't map a UML representaion for below representation
1. Company have many users.
2. Each user may belongs to different company.
3.Each user may have different roles in different company.
If I have represent a UML diagram for this,how can we find the roles of a user in each company.

Information we get from this diagram:
1- A company can have many roles: manager, programmer are roles in company a
2- Every role belongs to one company.
3- A user may have many roles: be a consultant at company a and programmer at company b.
4- A role may be overtaken by many users: user 1 and 2 are both programmers at company a
What this diagram shows is the static structure, you cannot identify which specific user works for which specific company using a class diagram.
You can use an object diagram for that purpose, but an object diagram is useful for showing just a snap shot of the system with specific instances.

Related

What specific design patterns should I implement for a web portal that allows customers to book multiple means(Flights,Car,Hotels) UML from a database

I only have to draw up a UML class design for it.
The web portal should allow the user to pick from a hotel, or flight, or car rental or all 3 or 2 out of the 3. The user should be able to search through the products as a guest but will be redirected to register or login to purchase a product, Admins are allowed to remove or add products to the productdatabase. What I initially have is a general set up of the system however I need to implement design patterns. Now I already tried singleton but I see no reason for there to be only one instance in this portal.
1st half of my UML class diagram
2nd half of my UML class diagram

Role changing action. who does it belong to?

If a user has the chance of asking for his role to be changed (for example : an employee asking to be promoted to leader ). Does the action belong to the Employee or to the leader ?
You question is tagged "use-case". Int this regard, there seems to be a confusion in your question about what an actor really is. Here is what the UML specs say:
An Actor models a type of role played by an entity that interacts with the subjects of its associated UseCases. Actors may represent roles played by human users, external hardware, or other systems.
If a user changes role during the interaction with the system, in the model, it's just like another actor interacts with the system. Example:
an user interacts with the system with the role of an Employee and "executes" some use-cases corresponding to the Employee actor;
this user gets promoted to a Manager.
With the new role, the user may "exectute" use-cases associated with the Manager actor.
A same user may play several roles with the system. But this does not change the model: the model is about all the users who have a given role at a given moment, regardless of the individual who performs this role.
Now in some cases, one role is a specialization of the other. This means that all the users having one role also have the other role. A typical example is if a Manager is always an Employee. In this case, you'd show the inheritance in your use-case diagram, to avoid replicating for Manager all the association of Employee with use-cases.
If your question is not about use-cases but about classes for authorisation management, then you'd need to reformulate your question. But before, have a look at the existing questions on SO, since there are many questions about class diagrams and how to assign users authorisations.

SSAS security: is one role per user practical?

We have to authorize hundreds of users for a cube, and the users must be restricted to individual dimension members. Two dimensions are relevant for the permissioning, a datatype permission (with only 10 members) and a customer dimension (with 2000+ members).
Since one user can be permissioned for any number of datatypes and customers, we could build one role per datatype and one role per customer... ending up with 2010+ roles. The datatype roles are not authorized for any customers and vice versa, therefore we could enable users for any combination of datatypes and customers.
On the other hand, if we create one role per user, we end up with only hundreds of roles. I therefore do not see the benefit of roles in our scenario. We will probably use AMO to maintain the roles.
My question is, if there is a penalty when using one role per user or it this is a tested method. Of course I am also interested in any alternative approach.
Problem in this case is that you don't have any data that would help you automate the roles.
So in order to make use of suggestions by mmarie you will need to further develop your cube and to maintain the user-customer relationship somehow (more horrible admin work).
Technically your scenario seems simple enough to be handled by http://easyroles.com which was made specifically to help out in these situations.
Disclaimer: I am involved with eR tool, but there is no other way I can answer this question since there are no other tools that are made for this.

how can we model the behaviors of different types of users in DDD?

I am in a situation in which I am supposed to model (in domain) requirement where a user can be bill admin and system admin and employee.
All the Admins can do whatever the normal user can do, but a normal user cannot do what the other roles can do. The problem is that I dont understand how I can do this by inheriting the user entity and I have read thats not a good idea, so dont want to go that way..
The Employee, System Admin and Bill Admin are different roles of a user. Any suggestions?
Update :
More Information: Given that the Employees BC and Billing BC and System BC are three different Bounded Contexts what would be the ideal way of handling the above given scenario?
It may be that you are mixing bounded concepts and the inheritance is probably not helping either :)
Typically one would have an Identity and Access Control BC. This is where we may find a User, Permission, and a Role.
Then one may have an Employee or Human Resources BC. This is where concepts such as Employee and Manager may exist.
So it may help to split these concepts.
When a new employee is registered an EmployeeRegistered event may be published by the HR BC, using a service bus, that the I & AC BC subscribes to in order to register a new user.
Hope that helps.

Change Security Role to Business Unit from only blank and Organisation CRM 2013

In CRM 2013 I would like Business Units to have distinct Products that aren't shared amongst them.
However you can only set Products Security Role as "Organisation" or "None Selected"
How would I be able to specify Business Unit Security settings?
Is it even possible?
Entities, can be owned by Organization, User or a Team. Product Entity is owned by Organization so it can be viewed by whole organization. Organization-owned entities typically contain data involving something that belongs to or that can be viewed by the whole organization. Organization-owned entities cannot be assigned or shared.
Have a look at Entity Ownership and please check this blog for more.

Resources