Configuring reports > Adding permissions to individual reports

7.3 Adding permissions to individual reports

To add permission to view individual reports to the users' permissions

  1. Open the reporting.xml file located in the Viewpoint home directory.
  2. Give reports a unique permission.
    1. Locate the <report> element of the report that will require the permission. Insert the <permission> element and give it a name.
    2. It is recommended that you name permissions in the following way: <permission name="report.[category].[report_name]" />

      The category should correspond with the directory where the report exists. By default, all reports are displayed in the Adaptive category and located in the adaptive directory.

  3. Add the permission to the users' permissions.
    1. Open the core.xml file located in the Viewpoint home directory and scroll to the <definition name="role-name"/> that will receive the permission.
    2. Insert the new permission within the element. To grant a group access to all reports within a certain category, insert an asterisk rather than the report name:
    3. <permission name="report.jobs.*" />

      Similarly, to grant permission to access all reports, grant the role the following permission:

      <permission name="report.*" />
  4. Create a directory to hold reports if you specified a custom category.
  5. The directory name must correspond with the category name. For example, you could create the jobs directory to place all the job-related reports, such as Jobs Submitted. This will be located in the Tomcat webapps/reporting/report directory.

  6. Change the <category> element to the directory name so that Viewpoint can locate it.
  7. Modify the <display-category> to update the display name for the category. As an example, see this configuration for the Jobs Submitted report:
  8. <reports>
       <report>
         <display-name>Jobs Submitted</display-name>
         <report-design>jobs_submitted.rptdesign</report-design>
               <display-category>Jobs</display-category>
        <category>jobs</category>
        <description>Presents the Jobs submitted by credential (user, group, account and quality of service) for the supplied time in table format with name and total of jobs</description>
        <permission name="report.jobs.jobs_submitted" />
      </report>
    </reports>
    

    Viewpoint looks in the jobs directory to locate the report. A user with the report.job.jobs_submitted permission may view the report on the Reporting page and run it. The Reporting page will show that it is the jobs category.

Related topics