Additional permission parameter for Search ACLs

out of the array in the options, you need to build a map otherwise you are looping over all entities every time a proc is run. That's costly, especially with 3 `if`s in the loop.

But it's good to have the options contain an object describing the entity def.