added the propagate viewing right sql query
resolved merge conflicts