Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-419

Add permission syntax to allow class/method/field

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3
    • 3.4.0
    • None

    Description

      WHAT
      The class permissions can only deny access to methods/fields. It is cumbersome to use when only a few methods need to be allowed. Adding a syntax to explicitly allow class members would also enable easier composition from the RESTRICTED permissions.

      HOW
      Add a +/- (default is -) in front of class name in permissions for the parser to determine whether an allow or deny set is to be created.
      Example:

      final String src = "java.lang { +Class { getName(); getSimpleName(); } }";
      final JexlPermissions p = RESTRICTED.compose(src);
      

      Attachments

        Activity

          People

            henrib Henri Biestro
            henrib Henri Biestro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: