I was using ERC721 from 0.7 version of open-zeppelin contract and had no issues with
_isApprovedOrOwner function check. But I just upgraded to 0.8 version and saw that both these functions are using
ERC721.isApprovedForAll to check for approveAll permission. We overwrote
isApprovedForAll function in our token contract and this change is causing the tokencontract to use the
isApprovedForAll function inside ERC721.sol. Does this mean we need to override
_isApprovedOrOwner function as well?
require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),
require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
fixes my issue.