acl: fix permission check on listdirectory

Target: master, 0.8, 07
Ticket: #8410
Acked-By: Paul Millar
(cherry picked from commit 033f7eb1fac3c49a29108e0477701caaa43885f0)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>