canEdit and showAddTable can be combined