Roles - user-specific views of a datasheet

Intended use for roles

The information a user sees on a datasheet is determined by the current layout of the datasheet. The modeler can create different layouts with a different set of visible fields that users with admin privileges can switch between: However, each switch always affects the view of all users on a datasheet. If we want to achieve that different users / user groups can also see different fields at the same time, we can use the role concept for this. In this case, a user takes a certain "role" (e. g. that of purchasing) and therefore sees the datasheet with a layout specially created for this role.

How does a user get assigned a role?

Assigning user roles is a typical rights management task for an application. Since the determination of rights on an element in REWOO Scope is indirectly controlled by a user's connection network, the same mechanism is used to automatically determine the respective user roles. For example, if a user gets read permission on a purchase order via a connection of the type "Purchase2Order", it is assumed that the user views the order from the perspective of the purchaser. If he also comes to the element in question via other connection paths, he is assigned additional roles from which he can freely choose when viewing the datasheet.

Modeling example

Creating different layouts

In Designer, the first thing to do is to define the different layouts for the different roles.

In our example, we want to consider a request form with different roles "requester", "approver" and "accounting". For each role we create a layout. The approval layout includes additional entries for the approval.

Creating the role definitions

The different roles must then be defined. For this purpose, a so-called role set is first created in the "Roles" tab in the data sheet designer, which then accommodates the actual roles. A type can have any number of different role sets, but an element can only use one role set at a time. After creating the role set, a previously created layout must be associated with one or more connection types for each of the new roles. The association is then still provided with a name, which later indicates to the user under which "role" he is currently viewing the data sheet.

The example defines a role set named "request". Within this structure, the roles "requester view", "approval view" and "accounting view" are created. Each new role assigns a corresponding connection type to a layout (created in the previous step). The creation of the role sets is done via the "Plus" button. Associated roles can be created afterwards via the "Save" button.

Definition of roles
Switching on the role-based layouts on the element

To activate role-based layouts for an element, the corresponding option must be set in the "Change Layout..." dialog. The role set to be used is also selected here. The user must have admin privileges on the element to make this change. The following screenshot shows this for the "Power cable 3m" element in our example:

activate role based layout
Assigning the roles

In order for the role-based layouts to be displayed for the respective users, they must reach the element via a connection of the corresponding type. The dialog for displaying the users involved also provides information about which user with which role gets the data sheet displayed.

Show user and roles
Display of the datasheet

If a corresponding user now opens Scope, he sees the element according to his role determined by the dependency net.

Role selection