Skip to main content

Customizing IBM Rational ProjectConsole to restrict Dashboard access

Miguel Pozos (mpozos@us.ibm.com), Software Engineer, IBM, Software Group
Miguel Angel Pozos
Miguel Angel Pozos has been a software engineer at IBM/Tivoli since June 2002. He holds a BS in computer science from the University of Texas at Austin and has recently begun using the IBM Rational suite of products for project management and test progress reporting.

Summary:  IBM Rational ProjectConsole's interactive Dashboard, which lets users create charts for inclusion in HTML reports, is normally accessible to all users. The customization described here restricts access to Administrators.

Date:  14 Nov 2005 (Published 14 Jun 2005)
Level:  Introductory
Activity:  413 views

IBM® Rational® ProjectConsole, part of the IBM Rational Team Unifying Platform, is a Web-based project management tool that automates reporting on project status and progress. It gathers data from a variety of sources and automatically generates HTML reports containing charts that display trends or distributions. Its interactive Dashboard lets users create charts for inclusion in the HTML reports and dynamically analyze these charts through drill-downs. The Dashboard is normally accessible to all users, but you may want to restrict its access to users in the Administrator group. This article explains why and shows you how.

Why would you want to restrict access?

The Dashboard is a Java applet and as such requires a specific version of the Java Runtime Environment (Sun Distribution, Version 1.3.1 or above, although Versions 1.4.0 or 1.4.1 are recommended, depending on the operating system of the machine used to view data). Downloading a version of the JRE to a computer that already has another version installed can cause conflicts with applications that have dependencies on specific JRE versions. Thus, some users might not want to run the Dashboard applet.

ProjectConsole's user management makes a distinction between users in the Administrator group and everyone else. You can avoid the JRE conflict by restricting access to the Dashboard to users in the Administrator group and taking advantage of ProjectConsole's static HTML report generation capabilities. Users outside the Administrator group can take a quick glance at a project's status in the ProjectConsole Web site's main view without ever launching the Dashboard, provided that the generated HTML reports are properly configured.


How do you restrict access?

When a ProjectConsole Administrator logs on, the control bar in the Web site's main view looks like Figure 1.

Figure 1: ProjectConsole's control bar when an Administrator logs on

When a user outside the Administrator group logs on, the control bar looks like Figure 2.

Figure 2: ProjectConsole's control bar when a non-Administrator logs on

You restrict access by removing the Dashboard button from the non-Administrator control bar. The content of this bar is controlled by an XSL style sheet in a file called banner.xsl stored on the ProjectConsole server in <Install Dir>\Common\rwp\webapps\projectconsole\pjc. By default, <Install Dir> is C:\Program Files\Rational.

The XSL code has one conditional statement that controls which buttons display in the control bar -- <xsl:when test="appRoot/oa">, in the segment that starts with <xsl:choose>, as shown in Listing 1. The code that follows this conditional statement is to be applied only when the logged-on user is a ProjectConsole Administrator, as indicated by the value of the XSL test being "appRoot/oa." In the original banner.xsl file, the conditional statement is placed after the code launching and defining the Dashboard button. (Note that the code in Listings 1 and 2 has been manually formatted for readability. The actual banner.xsl file may be formatted differently.)

<td nowrap="nowrap" align="center" class="smalltext">
   <a href="#"onclick="javascript:top.contentFrame.document.location.href=
      '/projectconsole/main?USE_CASE=adm_display_mem_profile_hds&;ACTION=display'">
      <img src="/projectconsole/common/images/my_profile.gif" width="15" height="15"
       alt="" border="0"/>
   </a>
   <br/>
   User Profile
</td>
<td>
   <img src="/common/images/shim.gif" alt="" width="5" height="1" />
</td>
<td class="topframeshadow" width="1">
   <img src="/common/images/shim.gif" alt="" width="1" height="37" />
</td>
<td class="topframehighlight2" width="1">
   <img src="/common/images/shim.gif" alt="" width="1" height="1" />
</td>
<td>
   <img src="/common/images/shim.gif" alt="" width="5" height="1" />
</td>
<td nowrap="nowrap" align="center" class="smalltext">
   <a href="javascript:launchDashboard();">
      <img src="/projectconsole/pjc/Icons/ProjectConsole/Dashboard.gif" width="15"
       height="15" alt="" border="0"/>
   </a>
   <br/>
   Dashboard
</td>
<td>
   <img src="/common/images/shim.gif" alt="" width="5" height="1" />
</td>
<td class="topframeshadow" width="1">
   <img src="/common/images/shim.gif" alt="" width="1" height="37" />
</td>
<td class="topframehighlight2" width="1">
   <img src="/common/images/shim.gif" alt="" width="1" height="1" />
</td>
<td>
   <img src="/common/images/shim.gif" alt="" width="5" height="1" />
</td>
<xsl:choose>
   <xsl:when test="appRoot/oa">
      <td nowrap="nowrap" align="center" class="smalltext">
         <a>
            <xsl:attribute
name="href">javascript:launchDashboardDesigner();</xsl:attribute>
            <img src="/projectconsole/pjc/Icons/ProjectConsole/DashboardDesigner.gif"
             width="16" height="14" alt="" border="0" />
         </a>
         <br/>
         Designer
      </td>

Listing 1: Excerpt from the banner.xsl file showing the original placement of the <xsl:choose> segment

To remove the Dashboard button from the non-Administrator control bar, you'll move the <xsl:choose> and <xsl:when testÂ…> lines to precede the group of five <td> tags that define the looks of the Dashboard button and launch the Dashboard. This will indicate that the Dashboard button is to be displayed only if the user is an Admininstrator. The resulting code will look like Listing 2.

<td nowrap="nowrap" align="center" class="smalltext">
   <a href="#"onclick="javascript:top.contentFrame.document.location.href=
      '/projectconsole/main?USE_CASE=adm_display_mem_profile_hds&ACTION=display'">
      <img src="/projectconsole/common/images/my_profile.gif" width="15" height="15"
       alt="" border="0"/>
   </a>
   <br/>
   User Profile
</td>
<xsl:choose>
   <xsl:when test="appRoot/oa">

      <td>
         <img src="/common/images/shim.gif" alt="" width="5" height="1" />
         </td>
         <td class="topframeshadow" width="1">
            <img src="/common/images/shim.gif" alt="" width="1" height="37" />
         </td>
         <td class="topframehighlight2" width="1">
            <img src="/common/images/shim.gif" alt="" width="1" height="1" />
         </td>
         <td>
            <img src="/common/images/shim.gif" alt="" width="5" height="1" />
         </td>
         <td nowrap="nowrap" align="center" class="smalltext">
            <a href="javascript:launchDashboard();">
               <img src="/projectconsole/pjc/Icons/ProjectConsole/Dashboard.gif" width="15"
                height="15" alt="" border="0"/>
         </a>
         <br/>
         Dashboard
      </td>
      <td>
         <img src="/common/images/shim.gif" alt="" width="5" height="1" />
      </td>
      <td class="topframeshadow" width="1">
         <img src="/common/images/shim.gif" alt="" width="1" height="37" />
      </td>
      <td class="topframehighlight2" width="1">
         <img src="/common/images/shim.gif" alt="" width="1" height="1" />
      </td>
      <td>
         <img src="/common/images/shim.gif" alt="" width="5" height="1" />
      </td>
      <td nowrap="nowrap" align="center" class="smalltext">
<a>
            <xsl:attribute name="href">javascript:launchDashboardDesigner();</xsl:attribute>
            <img src="/projectconsole/pjc/Icons/ProjectConsole/DashboardDesigner.gif"
             width="16" height="14" alt="" border="0" />
         </a>
         <br/>
         Designer
      </td>

Listing 2: Excerpt from the banner.xsl file showing the modified placement of the <xsl:choose> segment

Now that you understand what you'll be doing, follow these steps to modify the XSL style sheet in order to remove the Dashboard button for non-Administrators:

  1. Copy the banner.xsl file and store it elsewhere as a backup copy just in case you need to restore it. Alternatively, you can rename this file and leave it in the same directory for easy access. Because making changes to the installed ProjectConsole XSL files isn't supported by IBM, this is by far the most important step.
  2. Using a text editor, copy the entire contents of the original file into a new one and save it as banner.xsl.
  3. Cut the <xsl:choose> and <xsl:when test=" appRoot/oa"> lines from their present location and insert them after the </td> tag that follows the line User Profile.
  4. Save the file. Make sure it's saved at the location of the original file and has the same name (C:\Program Files\Rational\Common\rwp\webapps\projectconsole\pjc\xsl\banner.xsl).
  5. Optionally open the file in Internet Explorer to ensure that all of the tags are properly formed and there are no accidental errors in syntax.
  6. Stop these six Windows services: Rational ProjectConsole Collection Server, Rational ProjectConsole Dashboard Server, Rational ProjectConsole Report Server, and the Rational Web Platform HTTP server, ReqWeb servlet engine, and servlet engine.
  7. Start the same six services.

After you make these changes, all non-Administrator users who log on will see the control bar shown in Figure 3. Note that the Dashboard button doesn't appear on the bar.

Figure 3: The control bar for non-Administrators after customization

There won't be any change in how the control bar appears to Administrator users.


What to do next

Only users in the Administrator group will have access to the Dashboard after this customization. Therefore, it's extremely important for Administrators to create and publish all charts necessary for the HTML reports in the ProjectConsole main view. Furthermore, I would recommend that you set up each chart to be published on a schedule so that charts in the HTML reports contain the latest collected data. You can do this by right-clicking a Metrics Panel in the Dashboard and selecting the context menu item Publish on Schedule.

To reverse the effects of this customization, simply restore the original banner.xsl file.


Resources


About the author

Miguel Angel Pozos

Miguel Angel Pozos has been a software engineer at IBM/Tivoli since June 2002. He holds a BS in computer science from the University of Texas at Austin and has recently begun using the IBM Rational suite of products for project management and test progress reporting.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=85694
ArticleTitle=Customizing IBM Rational ProjectConsole to restrict Dashboard access
publish-date=11142005
author1-email=mpozos@us.ibm.com
author1-email-cc=jbalin@us.ibm.com

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers