Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Ask for user role in if condition

  1. #1
    Join Date
    Jan 2012
    Posts
    26

    Default Ask for user role in if condition

    I'd like to display a hyperlink on my reports which is only visible for users belonging to a certain user role. Is there a way to get the user role of the user generating the report?

    Thanks and best regards,

    rudolph

  2. #2
    Join Date
    Nov 2009
    Posts
    688

    Default

    Yes there is. In the datapage in the report designer you have the options "env:roles" and "env:username" in Environment. This gives the user and the roles of the user who execute the report.

    Johan

  3. #3
    Join Date
    Jan 2012
    Posts
    26

    Default

    Thank you very much. I solved it with the following condition in the visible item:

    =IF(Contains(ENV("roles");"userrole");"FALSE";"TRUE")

    Best regards,

    rudolph

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.