OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
The Android application checks the value of the can_edit_tree instance meta permission and does not PUT changes to the API if it has a value of false. This meta permission was incorrectly looking only at plot fields. This resulted in members of a role that could only edit tree fields being prevented from saving any tree changes.
Coverage increased (+0.001%) to 83.798% when pulling a5065b601fd237ed68a49142947bf65da9273738 on jcw/tree-edit-perm into aaed97e1d7c61d59289473049669ff84d04378ac on hotfix/2.21.6.
Overview
The Android application checks the value of the
can_edit_tree
instance meta permission and does not PUT changes to the API if it has a value of false. This meta permission was incorrectly looking only at plot fields. This resulted in members of a role that could only edit tree fields being prevented from saving any tree changes.Connects https://github.com/OpenTreeMap/otm-clients/issues/446
Notes
The
can_edit_tree
instance meta permission is not used by the web app or the iOS app, so the effect of this change is limited.Testing Instructions
Setup
sdtest
.Test
master
branches of the application.sdtrees
instance.sdtrees
instance (this ensures that the permissions are reloaded.