Menu
Free Trials
Table of contents

Configuring Mondrian roles

Overview

Sometimes it’s necessary to limit access to some parts of the data. To solve this you can define an access-control profile, called a Role, as part of the Mondrian schema and set this role when establishing a connection with Flexmonster Pivot Component.

Requirements

  • Flexmonster Pivot Component v2.210 SITE edition or higher
  • Relational database and Mondrian schema for it
  • Java JRE 1.7+

Step 1: Configure roles in Mondrian schema file

First of all, you need to configure roles in the Mondrian schema file. Please refer to the Mondrian documentation for more details.

Step 2: Launch Flexmonster Accelerator

Start (or restart) Flexmonster Accelerator for Mondrian. Please refer to the Accelerator “Getting Started” guide for more details.

Step 3: Configure Flexmonster Pivot Component

Now, let’s specify Mondrian roles in the configuration. Here is a minimal sample created with JavaScript API (replaceproxyUrl, catalog, cube and roles parameters with your specific values):

var pivot = $("#pivotContainer").flexmonster({
	toolbar: true, 
	report: {
		dataSource: {
			dataSourceType: "mondrian",
			proxyUrl: "localhost:50006",
			dataSourceInfo: "MondrianFoodMart",
			catalog: "FoodMart",
			cube: "Sales",
			binary: true,
			// Mondrian roles
			roles: "California manager"
		}
	},
	licenseKey: "XXXX-XXXX-XXXX-XXXX-XXXX"
});

Also, it’s possible to create XML report with the same configuration:

<config>
  <dataSource type="mondrian">
    <proxyUrl>http://localhost:50006</proxyUrl>
    <catalog>FoodMart</catalog>
    <cube>Sales</cube>
    <binary>true</binary>
    <!-- Mondrian roles -->
    <roles>California manager</roles>
  </dataSource>
</config>