Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user class based filters

Status
Not open for further replies.

spicysudhi

Programmer
Nov 10, 2003
575
FR
hi,

I have designed a package, contains Region, Product Type and Qty. The source data contains 6 countries in Region and 7 Product Types. The users are allowed to query this using query studio.

The requirement is the data should be filtered to the Region and Product Type based on the user class they belong. The user classes are created with same name as Region and Product Types. One user can belong to multiple user classes (say for example 2 regions and one product type), in this case the corresponding filter should be applied.

I had a look in the framework manager and there exists only the user name/locale/email/phone as the session parameters. Is there anyway, I can get the user classes and is there any easy method to handle the user belonging to multiple user classes.

thanks.

regards,
Sudhi
 
Hi Sudhi,

In Framework Manager, right-click on a query subject and go into the Specify Security Filters option. Add in the user classes in question from your security namespace, then 'create/edit embedded filter' for each one to define the relevant filter. The way this works as standard is that if a user belongs to more than one user class they get the sum of their privileges, so you don't need to do any clever coding to cater for users belonging to multiple classes.

Hope that helps!

MF
 
yes, i tried this and works fine when the query is a direct from table. Unfortunatelly my queries are native (i have written oracle queries directly!) and in this case the security definitions are not working :(

thanks.
sudhi
 
Hi sudhi,

If you're coding the SQL for your report in a Tabular SQL object, then you are in absolute control of the query, including any filtering, so any filters that would normally be added as a result of FM Security will not apply. Your only choice would be to add the definitions for these filters as predicates yourself in the SQL. Is there a particular reason you're overriding the report's SQL query with your own? Generally this makes the report harder to code and maintain...

Best regards,

MF.
 
nope, wht i was saying was, i put my sql directly in FM instead of selecting column from tables and changin the options to native sql.

aniway, cognos confirmed that it wont work.

regards,
sudhi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top