Fix fetchEntitiesFromDB function to apply ACLs