Should holders have to authorize themselves to updateLandData?
Closed this issue · 2 comments
belohlavek commented
Currently a holder must do that in order to modify land data, here's an example test on how that works:
it('returns land data for a given set of parcel coordinates', async () => {
await land.authorizeOperator(user, true, sentByUser)
await land.updateLandData(0, 1, 'test_data', sentByUser)
const data = await land.landData(0, 1, sentByUser)
data.should.be.equal('test_data')
})
Is this necessary? If so, why?
nachomazzara commented
Agree, we may need to change the modifier of the _update function from
function updateLandData(int x, int y, string data) public onlyOperator(x, y) {
return _update(encodeTokenId(x, y), data);
}
To
function updateLandData(int x, int y, string data) public onlyOperatorOrHolder(x, y) {
return _update(encodeTokenId(x, y), data);
}```
abarmat commented
Good catch!
Agree, we will change the modifier to support Operators and Holders.