Oracle® Business Intelligence Presentation Services Administration Guide > Managing Oracle BI Presentation Services Security > Process of Authorizing Users to Act for Others >

Creating a Custom Message Template for Proxy Functionality


This task is a step in Process of Authorizing Users to Act for Others.

You need to create a custom message template for the proxy functionality that contains the SQL to:

  • Get the list of target users that a proxy user can act as. This list appears in the User box in the Act As dialog box.
  • Verify whether the proxy user can act as the target user.
  • Get the list of proxy users that can act as the target user. This list appears on the target user's My Account screen.

In the custom message template, you place the SQL to retrieve this information in the following XML elements:

Elements
Description

<getValues>
</getValues>

Specifies the SQL to return the list of target users and corresponding proxy levels.

The SQL must return either one or two columns, where the:

  • First column returns the IDs of the target users
  • (Optional) Second column returns the names of the target users

<verifyValue>
</verifyValue>

Specifies the SQL to verify if the current user can act as the specified target user.

The SQL must return at least one row if the target user is valid or an empty table if the target user is invalid.

<getDelegateUsers>
</getDelegateUsers>

Specifies the SQL to get the list of proxy users that can act as the current user and their corresponding proxy levels.

The SQL must return either one or two columns, where the:

  • First column returns the names of the proxy users
  • (Optional) Second column returns the corresponding proxy levels

You can create the custom message template in one of the following files:

  • The custom message file in the SAROOTDIR\web\msgdb\customMessages folder, where SAROOTDIR is the installation directory
  • A separate XML file in the SAROOTDIR\web\msgdb\customMessages folder, where SAROOTDIR is the installation directory

To create the custom message template:

  1. If you want to create the custom message template in the original custom message file:
    1. Make a backup of the original custom message file in a separate folder.
    2. Make a development copy in a different folder and open it in a text or XML editor.
  2. If you want to create the custom message template in a separate XML file, create and open the file in the SAROOTDIR\web\msgdb\customMessages folder, where SAROOTDIR is the installation directory.
  3. Start the custom message template by adding <WebMessage> begin and end elements. For example:

    <WebMessage name="LogonParamSQLTemplate">

    </WebMessage>

    NOTE:  The name that you specify in the <WebMessage> element must match the name that you specify in the <TemplateMessageName> element in the Oracle BI Presentation Services configuration file (instanceconfig.xml). For more information, see Modifying the instanceconfig.xml File for Proxy Functionality.

  4. After the <WebMessage> element:
    1. Add the <XML> and </XML> elements
    2. Between the <XML> and </XML> elements, add the <logonParam name="RUNAS"> and </logonParam> elements
    3. Between the <logonParam name="RUNAS"> and </logonParam> elements, add each of the following elements along with its corresponding SQL:
      • <getValues> and </getValues>
      • <verifyValue> and </verifyValue>
      • <getDelegateUsers> and </getDelegateUsers>

        The following entry is an example:

    <XML>

    <logonParam name="RUNAS">

    <getValues>select targetId
               from Proxies
               where proxyId='@{USERID}'</getValues>

    <verifyValue>select targetId
                 from Proxies
                 where proxyId ='@{USERID}'
                 and targetId='@{VALUE}'</verifyValue>

    <getDelegateUsers>select proxyId, proxyLevel
                      from Proxies
                      where targetId ='@{USERID}'
    </getDelegateUsers>

    </logonParam>

    </XML>

    (Note that you will need to modify the example SQL according to the schema of your database.)

  5. If you created the custom message template in the development copy of the original file, replace the original file in the customMessages folder with the newly edited file.
  6. Test the new file.
  7. (Optional) If you created the custom message template in the development copy of the original file, delete the backup and development copies.
  8. Load the custom message template by either restarting the server or clicking the Reload Files and Metadata link on the Oracle BI Presentation Services Administration screen. For more information on the Oracle BI Presentation Services Administration screen, see Overview of the Oracle BI Presentation Services Administration Screen.
Oracle® Business Intelligence Presentation Services Administration Guide Copyright © 2007, Oracle. All rights reserved.