acl: fix permission check on listdirectory

Target: master, 0.8, 07
Ticket: #8410
Acked-By: Paul Millar