some changes for permission check to addTask