COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: shevr on 19 Nov 2009 10:34:37 AM

Title: Retrieve user signon name
Post by: shevr on 19 Nov 2009 10:34:37 AM
How can we retrieve the user signon name for the person viewing a report?  Would like to implement row-level security.

Can anyone point me in right direction?

Thanks,

Richard
Title: Re: Retrieve user signon name
Post by: twlarsen on 19 Nov 2009 10:40:21 AM
I handle row level security in the model, but I use #sq($account.defaultName)# to get the user ID and link it to my security table.
Title: Re: Retrieve user signon name
Post by: angela on 19 Nov 2009 01:29:57 PM
There are several options and not all of them are actually in the FM user guide.  twlarsen is using a table which has the user's name and presumably some other key to restrict the data.  The guide tells you to use the Security filters on each Query subject (which would mean editing and re-publishing when new people/groups come on).  We use a data filter in each Query subject that compares each row to the groups that a person is in (both in the Cognos namespace and our LDAP) like so:
[Database View].[Store Dimension].[Store Security]    in (#CSVIdentityNameList()#)

You may need to play with the first part through concatenation or just an ETL to get each row to match up to a security group.  Then we nest our security groups.  For example "Retail VP" is in each "Store" group so he can see all the store lines, but "GenMgr01" can only see Store 01.