Users and Roles
In this section, you will learn how to set up the access concept for your application.
Setting up a Role Concept
The access concept of an application is based on roles which are defined within the customer account, and access rights assigned to these roles. Users are assigned specific roles within a project in order to give them the access rights necessary to undertake their responsibilities.
When setting up the role concept for an application, you first create an organization, and then define the roles within the organization. An organization reflects the way roles are grouped according to the responsibilities in your company.
- In the Role Management module, create a new organization, and save it.
- Open the new organization, and create the roles as required in your application's workflow. When creating a role, you define the role type, and assign the users to it.
For details, refer to the following conceptual information:
For the sample application, you create an organization named Sample Applications. In this organization, you set up the following roles for the defined responsibilities:
- Sample Expense Request – Employee: Creates a request for an expense and submits it.
- Sample Expense Request – Manager: Validates the request and either approves or rejects it.
- Sample Expense Request – Administration: Validates and confirms the payment, as soon as the request is approved.
Additionally, you create the initial Sample Expense Request – Designer role for developers of the application, and a Sample Expense Request – Managers & Administration role which includes managers and administration.
To define the roles of the organization, proceed as follows:
Create an organization named Sample Applications.
Click New role to define the roles, and and configure the roles as follows:
- Role Sample Expense Request – Designer with role type Static: Assign yourself to this role. The Sample Expense Request – Designer role is the initial role of the organization, and is used for the application developers.
- Role Sample Expense Request – Employee with role type Everybody: All users of your customer account are automatically assigned to this role.
- Role Sample Expense Request – Manager with role type Static: Select the users for this role for each execution environment from the user list under Members.
- Role Sample Expense Request – Administration with role type Static: Select the users for this role for each execution environment from the user list under Members.
- Role Sample Expense Request – Managers & Administration with role type Scripted: You define the script to add the users for this role. In the sample, this role combines the roles Sample Expense Request – Manager and Sample Expense Request – Administration by using the
is_user_in_lane()Freemarker method. For details, refer to Scripted Lanes in the Developer Guide for the Advanced IDE.
The sample's role setup is shown in the following image. Note that the organization is named differently in the sample.