Jump to content
We've recently updated our Privacy Statement, available here ×
  • How-to: customize Search Results Filters on role based


    asimkin
    • Features: JasperReports Server, User Interface Version: v5.5 Product: JasperReports® Server

    Question:

    How to customize View > Search Results Filters page to remove certain filter options on a per-role basis, for example to remove Schedule filters from everyone except for ROLE_SUPERUSER.


    Answer:

    NOTE: The solution requires config files modifications so make sure to backup the origin files metioned below

    1. Edit WEB-INFjs.spring.properties by adding the line

      bean.scheduleFilter.SuperUserRoleAccessList=SuperUserRoleAccessList
      

      into #For SchedulerFilter and its options section, ~line 220

    2. Edit WEB-INFapplicationContext-search-pro.xml file by adding the lines

      <util:list id="SuperUserRoleAccessList">
          <bean class="com.jaspersoft.ji.search.common.ProRoleAccess">
              <property name="roleName" value="ROLE_SUPERUSER"/>
              <property name="tenantId">
                  <null/>
              </property>
          </bean>
      </util:list>
      

      somewhere after <util:list id="proRoleAccessListDefault"> list, ~line 30

    3. Edit applicationContext-search.xml file, locate line

      <property name="roleAccessList" ref="${bean.scheduleFilter.RoleAccessList}"/>
      

      ~ 316 line no and modify it to

      <property name="roleAccessList" ref="${bean.scheduleFilter.SuperUserRoleAccessList}"/>
      
    4. Save the changes and re-start JasperReports Server.

    By these steps you create a new list of roles that should have access to Scheduled Filters and specify the list in Scheduled filters settings.


    Ref. Case #00052797


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...