Additional permission parameter for Search ACLs

the hasOwnProperty check should be the first line in the for loop.