Assigning Profile Attributes

Attributes can be defined for each server, organization, role, or user. See the JasperReports Server Administrator Guide for more information about defining the attributes.

Notice the attributes listed below the user’s roles in “Rita’s User Account”. CZS implemented them in order to take advantage of the variable substitution feature, which simplifies the creation of the access grant definition. This section explains the concept.

CZS determined that they need to describe their users in terms of the product lines that they sell and the geographical areas where they sell. Thus, each CZS user is assigned five attributes:

Four describe the employee’s geographical area of responsibility: country, region, state, and city. These attributes correspond to the levels of the Geographical Area dimension. The access grant definition shown in Attributes and Variable Substitution refers to these attributes.
One describes the products the employee is responsible for selling: product department. This attribute corresponds to the Product Line level of the product dimension.

Each user’s attributes determine the data returned to him by the view, based on an access grant definition that refers to these attributes by using variable substitution. For example, Rita’s attribute value for Cities is San Francisco, Los Angeles, Sacramento while Pete’s is San Francisco. Thus, Pete sees a subset of the data Rita sees.

CZS assigned the following attributes to their users:

Attributes of CZS Users

User

User Attributes

Geographical

Product/Department

Country

Region

State

Cities

Rita

USA

West

CA

San Francisco,
Los Angeles,
Sacramento,

Television, Wireless Devices

Pete

USA

West

CA

San Francisco

Television

Yasmin

USA

West

CA

San Francisco

Wireless Devices

Alexi

Japan

Kansai

Osaka

Osaka, Sakai

Wireless Devices

At a high level, CZS took the following steps in defining and leveraging attributes:

1. Defined the required attributes for each user by editing the associated account. These attributes are referred to by variable substitution in the AGXML file.
2. Created an access grant definition (AGXML file) that refers to these attributes.
3. Used the access grant definition in a Mondrian connection.
4. Used the Mondrian connection in the Ad Hoc Editor.

For details about configuring attributes and Mondrian connections, refer to:

Defining Attributes for Users
Using Attributes in an Access Grant Definition
Creating a Mondrian Connection
Creating a Sales Numbers Ad Hoc View

Defining Attributes for Users

Attributes can be created for each user, role, or organization defined in the server. At the user level, they are maintained as part of the account, which you can edit by clicking Manage > Users. CZS edited each of their users to include the attributes they mapped out during their planning phase. Editing Rita’s User Attributes shows Rita’s attributes in the Manage > Users page.

Editing Rita’s User Attributes

For more information, refer to the JasperReports Server Administrator Guide.

Using Attributes in an Access Grant Definition

With the attributes defined, CZS took advantage of them using variable substitution in their access grant definitions, as described in Attributes and Variable Substitution.

CZS's access grant definition (czs-access-grant.agxml) is shown in Access Grant Definition for CZS. It utilizes the attributes discussed in this section (Country, Region, State, Cities, and ProductDepartment ).

 

Version: 
Feedback
randomness