Henri Biestro created JEXL-419:
----------------------------------
Summary: Add permission syntax to allow class/method/field
Key: JEXL-419
URL: https://issues.apache.org/jira/browse/JEXL-419
Project: Commons JEXL
Issue Type: Improvement
Affects Versions: 3.3
Reporter: Henri Biestro
Fix For: 3.3.1
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:
{code}
final String src = "java.lang { +Class { getName(); getSimpleName(); } }";
final JexlPermissions p = RESTRICTED.compose(src);
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)