Check permission when deleting.