OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
186 stars 88 forks source link

Fix can_edit_tree instance meta permission #3268

Closed jwalgran closed 5 years ago

jwalgran commented 5 years ago

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

screen shot 2019-01-02 at 4 00 57 pm

Test

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.001%) to 83.798% when pulling a5065b601fd237ed68a49142947bf65da9273738 on jcw/tree-edit-perm into aaed97e1d7c61d59289473049669ff84d04378ac on hotfix/2.21.6.

jwalgran commented 5 years ago

Thanks for the review