LPS-43104 Implement filtering by VIEW permission in DM queries