Issue/318 handle unauthorized access

#318 
处理权限不足的情况