bug #4608 SELECT permission issues with relations and restricted access

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>