move canViewJobResource to util