Condition public=true is not working in ACL of announcement table


Description

Condition public=true is not working in ACL of announcement table

Steps to Reproduce


Steps to reproduce
1. Run announcement.list, see 3 demo data records

2. Update 1 of the demo data to public=true

3. New 1 ACL for read access of announcement table

4. Add condition public=true and then save, snc_internal will be added automatically

5. confirm 1 record matched the condition from ACL form

6. Impersonate Abel.tuter who is snc_internal user

7. Run announcement.list and confirm the result



Actual result: None of the record is shown. From debug security, all 3 record returns result False no matter it's public or not.


Expected results: user should be able to see 1 record

Workaround

This bug is not unique to just "public" but also to any keyword in Java. Workaround for new columns is to avoid using a Java keyword as the column name.

Workaround for existing columns is to remove the condition on the acl and create an equivalent script that uses current.getValue('<name_of_field>') for the logic. E.g., for a column named 'public', this is an equivalent script:

answer = current.getValue('public') == true;


Related Problem: PRB1479993