Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-4571

update handling of expressions that return null

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • plugins
    • None

    Description

      Expressions used in policy-conditions/row-filters might evaluate to null value i.e., like when the attribute referenced doesn't exist. In such cases, the evaluator returns string 'null'. Instead, an empty string would be a better return value in such case. This would also enable use of variables in sub-expressions, like:

       

      ${{var d = USER.deptCode;}} dept == ${{d}}
      

       

      With the current implementation, following value is returned for above expression, assuming USER.deptCode is 10:

       

      null dept == 10
      

      This is caused by the first expression, ${{var d = USER.deptCode{}}}, returning null.

      Attachments

        Activity

          People

            madhan Madhan Neethiraj
            madhan Madhan Neethiraj
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: