fixed permissions and filtering in search