Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Customize PUC by specific user

  1. #1
    Join Date
    Dec 2012
    Posts
    121

    Default Customize PUC by specific user

    Hi all,
    i would like to customize PUC taking care of the user who login into the system.
    For example, I would like that an admin user could see all menu buttons and, instead, an authenticated user or another one could see only some menu-buttons.

    I read about the possibility of changing PUC-UI, but i didn't find any documentation for my issue, e.g. change the UI basing on the user role.

    Any suggest will be appreciated.

    Yamas,
    Marco

  2. #2

    Default

    Dear Marco!
    I think my answer is out of dateed, but I decided to write comment to posts related to my problems.

    1.) Launch.jsp
    One of my attempts: I wanted to put the login username to the right-up corner. This one isn't good, because the Launch.jsp is the source for IFRAME in the middle of the working area.
    <% // ltorok
    // IPentahoSession userSession = PentahoHttpSessionHelper.getPentahoSession( request );
    // String user_descr = (String) userSession.getAttribute("user_descr");
    // String username = userSession.getName().toString();
    %>

    2.) tomcat/webapps/pentaho/mantle/Mantle.sjp
    <%@page import="org.pentaho.platform.api.engine.IPentahoSession"%>
    <%@page import="org.pentaho.platform.web.http.PentahoHttpSessionHelper"%>

    <% // ltorok
    IPentahoSession userSession = PentahoHttpSessionHelper.getPentahoSession( request );
    String user_descr = (String) userSession.getAttribute("user_descr");
    String username = userSession.getName().toString();
    %>


    <div id="loggeduserdiv" class="loggeduserdiv">
    <%= username%>
    </div>

    mantle/themes/onyx/mantleOnyx.css
    /* SZTE ltorok theja */
    .loggeduserdiv {
    display:block;
    position:absolute;
    right:10px;
    top:4px;
    z-index:9001;
    color:white;
    font-size:1.1em;
    }
    #loggeduserdiv {
    display:block;
    position:absolute;
    right:10px;
    top:4px;
    z-index:9001;
    color:white;
    font-size:1.1em;
    }





    3.) On the Dashboard you can add your Scripting Component and the first step can be "getting user from the context" and after it you can insert scripting/css metas
    //alert(Dashboards.context.roles);
    //alert(Dashboards.context.isAdmin);
    Dashboards.fireChange('loginuser',Dashboards.context.user);

  3. #3
    Join Date
    Dec 2012
    Posts
    121

    Default

    hi itorok,
    i will try your suggests.

    Thanks for the tips.
    Marco

  4. #4
    Join Date
    Aug 2013
    Posts
    1

    Default

    Hello,

    I have the same problem with customize PUC by user/role. Thanks to #2 I could change some elements by role but I can't change the main_toolbar.

    I would like to disable it for a specific role but it would be enabled for admins. Actually I can disable/enable for all users changing a property in "MantleSettings.properties" (in /biserver-ce/tomcat/webapps/pentaho/WEB-INF/lib/mantle-x.x.jar the folder org\pentaho\mantle\server\MantleSettings.properties), but it doesn't let me choose a user or role, just on or off.

    Any idea?

    Thanks and sorry for my english

Tags for this Thread

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.