1. The 'answer' variable — the only thing ACLs read
“An ACL script runs and returns true, but the user still can't read the record. Why?”
How to answer
- ACL scripts don't return — they SET a variable named answer.
- answer = true grants, answer = false denies. A return value is silently ignored.
- Default answer is false in scripts, so missing assignments deny access.
- Use gs.getUser() / current.* to compute the decision, then assign answer once at the end.
Reference script
// Read ACL on incident — only assignee or admin
answer = false;
if (gs.getUserID() == current.assigned_to
|| gs.hasRole('admin')) {
answer = true;
}Pitfall
Writing `return true` in an ACL script does nothing — the engine never reads the return value. Always assign `answer`.