Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Dashboard security on components

  1. #1
    Join Date
    Mar 2015
    Posts
    8

    Default Dashboard security on components

    Hello


    Can I make certain parts of a dashboard visible/invisible based on the security roles defined in my BI server?

    For example, is it possible to make the 'sales by territory' invisible for the users with the role 'Business analyst' in the Steel Wheels example?

    Thanks

  2. #2
    Join Date
    Aug 2014
    Posts
    17

    Default

    Hi,
    I did that to show/display chart according roles.

    I create a role "superV" and a function in a codesnipet or external file, with in parameter the id of the div to hide :
    var tab_roles = Dashboards.context.roles; //retieve roles of the user
    function hideForSuperV(idDiv) {
    for(var i= 0; i < tab_roles .length; i++) //browe the table of user
    {
    [I] if(tab_roles == 'superV') // if there is the superV role
    {
    $('#'+idDiv).hide(1); //hide the kpi where the id passed in parameter
    }
    }
    }

    And i call the function in a Pre execution script of a component. In my case it was in a selector component.
    function f()
    {
    hideForSuperV('idDiv');
    }

    Maybe there is a better way, but this it's mine and it works

    Cheers

  3. #3
    Join Date
    Mar 2015
    Posts
    8

    Default

    Thanks for sharing tgrosroyat,I'll let you know how it works out!

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.