Managing Roles

Roles define sets of users who are granted similar permissions. Administrators create roles, assign them to users, and set permissions in the repository (see Repository Permissions). By default, JasperReports Server includes the following roles; some are needed for system operation, some are included as part of the sample data:

Default Roles in JasperReports Server Installations

Role

Description

ROLE_ADMINISTRATOR

This role determines administrator privileges. This role is automatically assigned to the default jasperadmin user. It's a special system-level role, and administrators can assign it to other users, as explained in Delegated Administration.
Never delete this role, it's required for proper administration of the server.

ROLE_USER

Required to log in. This role is automatically assigned to every user in the server. It's a special system-level role.
Never delete this role, it's required to create users and allow them to log in.

ROLE_ANONYMOUS

When anonymous access is enabled, this role is automatically assigned to any agent accessing the server without logging in. It's a special system-level role. This role is also assigned to the default anonymous user. By default, anonymous access is disabled and this role isn't used. It's a system role that even administrators can't delete.

When you need to define permissions for sets of users, administrators can create new roles and assign them to users. Users can belong to any number of roles and each can be used for access to different resources.

Viewing Role Properties

1. Log in as an administrator (jasperadmin).
2. Select Manage > Roles. The Manage Roles page displays the roles defined in the server and properties for each role.

Manage Roles Page

3. To filter the list of roles, enter a search string in the search field of the Roles panel. The search results show all of the roles whose names contain the search string. If necessary, scroll through the new list or refine your search.
4. Select the role in the Roles panel. The role's properties appear in the Properties panel.

The Properties panel shows the role name and the users assigned to the role. You can enter a search term to find users in the list. Hover over a user ID to see a user's full name, as shown in the figure.

Creating a Role

1. Log in as an administrator (jasperadmin).
2. Select Manage > Roles.
3. Click Add Role. The Add Role dialog appears.

Adding a Role

4. Enter the name of the role. The role name is also the role ID and does not accept spaces or special characters.
5. Click Add Role to create the role.

The new role is included in the Roles panel. If you want to assign users to the role, click Edit in the Properties panel of the new role.

Assigning Users to a Role

You can assign multiple users to one role. To assign multiple roles to one user, edit the user's properties as described in Editing a User.

1. Log in as an administrator (jasperadmin).
2. Select Manage > Roles.
3. Select the role in the Roles panel.
4. In the Properties panel, click Edit. The role's properties become editable.

Editing the Members of a Role

5. Enter a different name to change the role name throughout the server.

Permissions in the repository that use the role name are automatically updated. However, role names in security files for Domains and OLAP are not updated with the new role name and may cause a security risk. If you use security files for Domains or OLAP, do not change role names without verifying the files as well. For more information, see the JasperReports Server User Guide.

6. To assign or remove role users, select the users, and click the arrow buttons between the Users Available and Users Assigned lists. You can enter a search term to find users in the lists. Hover over a user ID to see a user's full name, as shown in the figure.
7. Click Save to keep your changes, or Cancel to quit without saving.

Deleting One or More Roles

1. Log in as an administrator (jasperadmin).
2. Select Manage > Roles.
3. Select the role in the Roles panel. Use Control-click and Shift-click to make multiple selections.
4. In the tool bar of the Roles panel, click Delete and confirm the action.

 

Version: 
Feedback
randomness