Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to change the multiple access grant operation in domain security from AND to OR


    Friendly User
    • Features: Domains Version: v8 Product: JasperReports® Server

    Scenario:

    You're writing a domain security file and want one of the multiple access grant expressions to be true rather than all of them at the same time. This is achieved by using an OR operator between the access grant rather than default AND. How to achieve this?

    Solution:

    You can use orMultipleExpressions property of the access grant to signify that these grants are to be evaluated with an OR operation rather than AND. Here is how it looks:


                      <resourceAccessGrant id="Join_1_Row_Access_Grant1" orMultipleExpressions="true">
                        <principalExpression>some expression here</principalExpression>
                        <filterExpression>testProfileAttribute(SomeAttrib, 'Some Value')</filterExpression>
                    </resourceAccessGrant>


                      <resourceAccessGrant id="Join_1_Row_Access_Grant2" orMultipleExpressions="true">
                        <principalExpression>some expression here</principalExpression>
                        <filterExpression>testProfileAttribute(SomeAttrib, 'Some Value')</filterExpression>
                    </resourceAccessGrant>

    With orMultipleExpressions these two grants combined with a logial OR rather than logical AND letting you write security schemas with grants that will apply all together but not necessarily at the same time. See chapter 8.6.3.1 of JasperServer Data Management Using Domains guide:

    https://community.jaspersoft.com/documentation/v8-v80-v800/tibco-jasperreports-server-data-management-using-domains


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...