#3632 check for permission before publish