Managing Organizations

System admins and organization admins use the same pages for managing organizations, the only difference is that system admins can manage top-level organizations, and organization admins are limited to suborganizations.

Community edition users and administrators of deployments with a default single organization can generally skip this section. However, this procedure can be used to change the name of the default organization.

The following figure shows the organizations the system admin (superuser) can view, that is, all the organizations in the repository. As shown in the Organizations panel on the left, the system admin’s view begins at the root of the organization hierarchy and includes all defined organizations and suborganizations, so he can manage any organization or suborganization in the repository. In this example, there are two top-level organizations, and one of them has several suborganizations.

System Admin View of Manage Organizations Page

The following figure shows the same repository as seen by the admin of Organization (jasperadmin). It shows that this admin’s view is limited to his own organization and its suborganizations, and he can access and manage only those.

Organization Admin View of Manage Organizations Page

Viewing Organization Properties

1. Log in as a user with administrative privileges for the organization.
2. Select Manage > Organizations.

The organization management page appears, as shown in “System Admin View of Manage Organizations Page” or “Organization Admin View of Manage Organizations Page”.

3. To select an organization, click its parent in the left Organizations panel, then select the organization in the center panel. If there are many organizations, you can search for a specific organization, but the search will find only organization in the center Organizations panel.
4. Once you select an organization, the Properties panel on the right shows information about it:
     Name – Display name of the organization that appears on the organization’s top folder.
     ID – Unique and permanent organization ID used for logging into it.
     Alias – Unique but editable short organization name that can also be used when logging in.
     Description – Optional description that appears only in this Properties panel.
     Number of Users – Count of all users, including those in any suborganizations. Click Manage to see the list of users on the user management page.
     Number of Roles – Count all roles, including those in any suborganizations. The number of roles does not include the system roles (such as ROLE_USER) that appear at every organization level but are defined at the root level. Click Manage to see the list of roles on the role management page.

Creating an Organization

1. Log in as a user with administrative privileges for the parent of the new organization.
2. Click Manage > Organizations.
3. In the left-Organizations panel, expand the hierarchy of organizations to select the parent organization, for example Finance, then click Add Organization in the middle panel.
4. The Add Organization dialog appears.

Adding an Organization

5. Enter the organization name; the server automatically fills in the ID and alias based on the name. You can change the ID and alias if needed before saving the organization. Once saved, the organization ID can no longer be modified. The Description is optional. The previous figure shows this dialog with sample values.
6. To save the new organization, click Add Organization to <organization>.

The new organization appears in the Organizations panels. When you select it in the center panel, its properties appear in the Properties panel on the right.

The properties panel shows the number of users and roles in the organization and provides links to manage them. By default, new organizations have the following:

Two users with default passwords: the organization admin (jasperadmin/jasperadmin) and a sample user (joeuser/joeuser).

For security reasons, always change the default passwords immediately after creating a new organization. For instructions, see Managing Users.

The organization has no roles of its own. The default users have the system-wide roles ROLE_USER and ROLE_ADMINISTRATOR.
In the repository, a new folder is created in the parent’s Organization folder. This new organization folder contains a copy of the parent’s Organization/Folder Template folder. To manage the Organization folders, select View > Repository.

Default Folders for Organizations

Every organization contains a special folder named Organizations where you can create suborganizations. The Organizations folder always contains a folder named Folder Template. When you create a new organization, the entire content of the Folder Template is copied to create your new organization’s folders. You can add folders and resources in the Folder Template, and these are copied into each later-created organization.

The default folders in the Folder Template are:

Ad Hoc Components\Topics – The location where the Ad Hoc Editor looks for Topics to create new reports.
Temp – A folder visible only administrators, used by the server to store temporary files.
Templates – A folder that holds templates used when generating reports from Ad Hoc views.
Themes – A special folder managed by the system to contain CSS files that define the appearance of the user interface.

The Public folder visible in every organization is a special shared folder at the root level. The repository makes it accessible to every organization, but it is not within the organization folder.

There is a Folder Template at every level of the organization hierarchy, including the root. The system admin can add content to the top-level Folder Template for use in creating top-level organizations. Organization admins can add content to their Folder Templates for use in creating suborganizations.

Finally, the Folder Template itself is copied into a new organization, so each new suborganization has the same default folders and resources as its parent.

Editing an Organization

1. Log in as a user with administrative privileges for the organization.
2. Click Manage > Organizations.
3. In the left-Organizations panels, select the organization’s parent. In the center Organizations panel, select the organization.
4. In the Properties panel, click Edit so you can change the organization’s properties.

Editing Properties of an Organization

5. Edit the organization properties as needed. Changing the organization name changes the name of the organization’s folder, as well, but no other data. You can change the alias and description. The organization ID is value defined when the organization was created.
6. Click Save to keep your changes, or Cancel to quit without saving.

Creating Attributes on Organizations

Organization attributes can be used to derive the parameters of data sources used for reports. For example, an attribute with the same name could have different values in each organization, so that the same data source defiition would access a different database specific to each organization. For more information, see Attributes in Data Source Definitions.

You can create, edit, and delete organization attributes using the REST v2 API. For more information about these REST API requests, see the corresponding section of the JasperReports Server Web Services Guide.

To view, create, modify, or delete organization attributes:

1. Download and install the REST browser plugin from one of these links:
     REST plugin for Firefox
     REST plugin for Chrome
2. Log into JasperReports Server as system admin (superuser) or the organization admin (jasperadmin) of the organization you want to modify.
3. To view all attributes on an organization, use the REST plugin to send this API request:

GET http://<host>:<port>/jasperserver-pro/rest_v2/organizations/organizationID/attributes

To view individual attributes on an organization, add name=... paramters to the request above:

GET http://<host>:<port>/jasperserver-pro/rest_v2/organizations/organizationID/attributes?
name=Attr1&name=Attr2&...

To view single attributes on an organization, add the attribute name to the request above:

GET http://<host>:<port>/jasperserver-pro/rest_v2/organizations/organizationID/attributes/Attr3

4. To create attributes on an organization, or to replace all of its exisiting attributes, send this REST API request:

PUT http://<host>:<port>/jasperserver-pro/rest_v2/organizations/organizationID/attributes

{
  "attribute":[
  {
    "name": "Attr1",
    "value":"Value1" 
  },
  {
    "name": "Attr2",
    "value":"Value2a, Value2b"
  },
  {
    "name": "Attr3",
    "value":"Value3"
    "secure":"true"
  },
  ...]
}
5. To add one attributes on an organization, or to change the value of an existing attribute, send this REST API request. The attribute name in the URL must match the one in the content:

PUT http://<host>:<port>/jasperserver-pro/rest_v2/organizations/organizationID/attributes/Attr1

{
  "name": "Attr1",
  "value":"newValue1"
}
6. To delete a single attribute from an organization, use the following REST API request:

DELETE http://<host>:<port>/jasperserver-pro/rest_v2/organizations/organizationID/attributes/Attr1

To delete multiple attributes:

DELETE http://<host>:<port>/jasperserver-pro/rest_v2/organizations/organizationID/attributes?name=Attr2&name=Attr3&...

To delete all attributes:

DELETE http://<host>:<port>/jasperserver-pro/rest_v2/organizations/organizationID/attributes

Creating Attributes at the Server Level

Attributes can also be defined the server level, which is equivalent to the root organization. If a given attribute name is not defined on an organization or a user, it can have a value at the server-level to act as a default value. Server-level attributes may also be used as parameters in data source definitions. For example, the same data source may be imported to several servers, such as test and production servers, but a server-level attribute with the same name on each server makes the data source connect to a different database. For more information, see Attributes in Data Source Definitions.

To view, create, modify, or delete server-level attributes:

1. Log on as the system administrator (superuser on commercial editions, jasperadmin on community editions).
2. Select View > Repository and open the System Properties folder at the root.
3. Right click the GlobalPropertiesList resource and select Edit from the context menu.

The GlobalPropertiesList is a list of name-value attribute pairs. Some of the attributes are used internally, such as JDBC driver names and configuration settings. New attributes defined here have the same behavior as server-level attributes.

Editing Attributes at the Server Level

4. Use the fields to enter new attribute name-value pairs, and click Add to create new attributes.
5. Click Remove to delete a server-level attribute. Do not remove attributes defined by the system.
6. To modify an attribute, remove it first, then add it with the same name and a new value.
7. When secure attributes appear in the GlobalPropertiesList, their value is shown as *** symbols. The GlobalPropertiesList does not support adding a secure attribute. To add a secure server-level attribute, use the procedure in Creating Attributes on Organizations, but specify the REST API request as follows:

PUT http://<host>:<port>/jasperserver-pro/rest_v2/attributes/Attr3

{
  "name": "Attr3",
  "value":"Value3"
  "secure":"true"
}

You can also create, edit, and delete server-level attributes using the REST v2 API. For more information about these REST API requests, see the corresponding section of the JasperReports Server Web Services Guide.

Deleting an Organization

1. Log in as a user with administrative privileges for the organization.
2. Click Manage > Organizations.
3. In the left-Organizations panels, select the organization’s parent. In the center Organizations panel, select the organization and click Delete.

Administrators cannot delete the organization to which they belong. Confirming the delete completely removes all users, roles, and folders of the organization and all of its suborganizations from JasperReports Server.

Version: 
Feedback
randomness