IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    [SOLVED] Setting database client identifier before retrieving records
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
We have a requirement to show the report contents based on user id. We are using Oracle 10g VPD policies to apply data authorization. We are using SiteMinder for authenticating users into Webfocus environment. We retrieve login user id from the SiteMinder header variable and set the client identifier before the report is generated.(exec dbms_session.set_client_identifier('userid')Wink This works perfectly within our FEX file. I need to apply the same logic to display drop down boxes in HTML files(we populate drop down boxes with column values from a database table)
I have attached FEX sample code which displays data based on userid

SQL SQLORA
-MRNOEDIT EX SET_DB_CONTEXT '&REMOTE_USER';
TABLE FILE SQLOUT
END
TABLE FILE fund_master
PRINT *
END

This message has been edited. Last edited by: kerry,


Webfocus: 7.1.7/ OS: AIX Platform: Websphere
 
Posts: 3 | Location: Boston | Registered: June 25, 2008Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
You should include the context setting in the _site_profile. The _site_profile allows you to include a FEX that will be executed whenever a WF request is executed. You can get to the site profile setting in the client admin console under "Configuration/General".





WF Ver.: 5.x, 7.1.x, 7.6.x
App Servers: Tomcat, WebSphere, SunOne
Platforms: All ... Almost



"There is no limit to what you can achieve if you don’t care who gets the credit." Roger Abbott
 
Posts: 533 | Location: Toronto, Ontario, Canada. | Registered: May 26, 2004Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
FYI, Padma has not tried the option suggested yet and will take few more days to post the update. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 756 | Location: New York | Registered: November 16, 2004Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
Thank you for the suggestion. We made changes in our site profile to include the common fex. I also verified that common fex is called before HTML file is loaded but the result is not as expected. Basically we are trying to restrict of list of values shown in drop down box based on login user id. For example, if fund_master table has following records 001, 002,003,004,005, when user A runs the HTML report, user A should be able to see only 001, 002, 003 values from the drop down. When user B runs the same report, user B should be able to see only 001, 002, 003, 004 values.
We are using MAS (webfocus synonym) to populate the drop down boxes. I am assuming webfocus synonym uses default user configured in the data adapter. In our case the adapter is configured with application user(RPTUSER). Next step I want to try is, to add few records in fund_master table for RPTUSER and see if the drop down shows values as expected.

If anybody has any other suggestions please let us know


Webfocus: 7.1.7/ OS: AIX Platform: Websphere
 
Posts: 3 | Location: Boston | Registered: June 25, 2008Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
Have you tried using a procedure with a WHERE clause to populate your dropdown box?


Ginny
---------------------------------
Prod: WF 7.6.5 with 7.6.6 WFRS; AIX 5.2; WebSphere 6.1.0.15
Dev: WF 7.6.5 with 7.6.6 WFRS; AIX 5.3; WebSphere 6.1.0.15
Primarily self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable
 
Posts: 1536 | Location: BNSF: Fort Worth, TX | Registered: April 05, 2006Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    [SOLVED] Setting database client identifier before retrieving records

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.