Hello, there is a problem with the BoolOperand.__new__ method. The returned operand would not properly work in such a case:
Make a custom policy condition checking method, i.e. check_something.
Use it in a form: check_something:{parent}.attribute_one.attribute_two inside a statement's condition and it works.
Use it again in a condition_expression in a form not check_something:{parent}.attribute_one.attribute_two and it will silently fail, because characters like { and } are not recognized properly.
Hello, there is a problem with the
BoolOperand.__new__
method. The returned operand would not properly work in such a case:check_something
.check_something:{parent}.attribute_one.attribute_two
inside a statement'scondition
and it works.condition_expression
in a formnot check_something:{parent}.attribute_one.attribute_two
and it will silently fail, because characters like{
and}
are not recognized properly.https://github.com/rsinger86/drf-access-policy/blob/68c4c2bba87935253600b023a8ec54fde8694b26/rest_access_policy/parsing.py#L69
It should rather be: