Additional permission parameter for Search ACLs

can this be extracted in another function ?