ServiceNow Application Development
上QQ阅读APP看书,第一时间看更新

Creating a new role

In ServiceNow, roles are used to limit and control access to features in applications and modules. Once access to an application or module has been restricted by a role, any user group or user assigned to the role are granted access.

We can create a new role in the Roles modules under the User Administration application. The Roles modules will list all roles currently defined in the instance. Roles are stored in a system table named sys_user_role:

  1. Click on the New button to bring up the New Record form and enter a name for your new role. In our case, we will set the new role as servers and click on the Submit button.
  2. We will leave the Elevated privilege checkbox unchecked, which will be covered later in the book. The New Record form of the Roles tables is shown in the following screenshot:

Roles can contain other roles and thus any access granted to a role is granted to any role that contains it. For example, the knowledge_admin role contains the role knowledge, as shown in the following screenshot. Thus, any application or modules that has a requirement of role knowledge will also be accessible by groups and users assigned to the knowledge_admin role:

Once we have created a new role, we will assign it to a group. But first we will assign a user to a group.