Skip to Content
Author's profile photo Former Member

How to set user level security in a report at cliente side

In this blog post I  would like to share a way to set user level security to a WEBI report.

By user level security I mean  restricting the visualization of certain partsa of reports to some users, based on a user secutity level.

For the sake of demonstration I  will work with three users and three levels of security.

This are my users and their security levels

user level sec
Roger 1
etizz 2
humga 3

I will use an Excel sheet as a DP to hold these data.

There are some restritions on the use of this approach. In order this to work, users can only visualize the documents, not being able to edit it.

I will use e-fashion with the following objects in the result of my query :

State, City , Lines , Category and Sales revenuee

My user profile will be :

level sec = 1 – Users can see State , City and Sales Revenue;

level sec = 2 – Users Can see State, City, Lines and Sales Revenue;

level sec = 3 – Users can see all data.

To start, I create a document with my query from e-fashion :

/wp-content/uploads/2014/12/query_611027.png

Which gives me the following table

/wp-content/uploads/2014/12/table_611028.png

After that, I import my Excel sheet as a personal DP, which gives me the following tables :

both tables.png

Create a variable global_user_sec = =([level sec] Where ([user]=CurrentUser())) In Report,

This will give me the user´s security level according to my users table.

Then I can create two dim variables :

{Lines security] = If( ([ global_user_sec] >=2;[Lines]) and

[Category security] = If ( [global_user_sec] >=3 [Category]).

Dropping [State], [City] , [Lines security] and [Category security] and [Sales revenue] will do the trick.

Cheers,

Rogerio

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      GReat Idea!

      Author's profile photo Former Member
      Former Member

      Hi Rogerio,

      Can u explore on last column (user_sec_level) in report 1, in result objects pane u took four dimension and one measure but in report appearing total 6 column.

      Also it's work on OLAP universe / connection?

      regards,

      amrendra

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      HI Amrendra,

      thanks for your comment. Sorry for that, the last column shouldn't be there. The last column is the one from the Excel DP.

      I think it should work. Since you can merge dimensions from an OLAP universe/connection.

      CHeers,

      ROgerio