Audit Fixes 1 - Removes OZ Ownable from Space contract and makes checks for space token ownership to see if caller is space owner (#1424)

Removing the OpenZeppelin ownership logic, and, checking directly for
the ownership of the Space’s SpaceOwner NFT. The SpaceFactory could be
the owner during the bootstrapping phase, and afterwards, could transfer
the NFT to the proper owner. Doing a direct check like
_spaceOwner().ownerOf(tokenId) == _msgSender() would be safe because
that’s what the owner entitlement is going to check eventually.

---------

Co-authored-by: Kerem Kazan <kerem.kazan@gmail.com>
This commit is contained in:
Giuseppe Rodriguez 2023-02-07 15:57:39 -08:00 committed by GitHub
parent 8a688ef92a
commit 7d6ffad2de
3 changed files with 79 additions and 209 deletions

View file

@ -105,6 +105,9 @@ func (s *accountDataStatements) SelectAccountDataInRange(
filter.Senders, filter.NotSenders,
filter.Types, filter.NotTypes,
[]string{}, nil, filter.Limit, FilterOrderAsc)
if err != nil {
return
}
rows, err := stmt.QueryContext(ctx, params...)
if err != nil {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long