Closed atalekar closed 2 years ago
The line in HomeScreenFragment.showAddFeatureDialog
causing this exception is:
Timber.e("No permissions set on layer %s%", layer.getId());
The format string is invalid, which is what is causing the reported exception. That said, after the "add feature" fab is tapped, the the user shouldn't be able to select a layer to which they don't have permission to add features.
@atalekar Also, showAddFeatureDialog
is not checking whether the user has owners/manager role, in which case they should be able to add to all layers. I'll try to send a fix.
I think the underlying reason why this was crashing is that the layer didn't have polygon or points selected. Currently the method in question requires any layer to collect either polygons or points - but the UI on web app allows it to be multiselect which allows you to select points only (default), polygons only, both points and polygons, neither. I should probably be a single one and required.
The project not having any layers allowing contributors could add points or polygons exposed the issue, but it isn't the root case. I'm preparing an actual fix now - in the meantime I assume setting "Contributors can add..." on one or more layers resolved the issue for you?
We spoke, this can be worked around by granting contributors the right to add points or polygons via the web app. #1044 will also require the data collectors to be granted "manager" access for the interim.
To Reproduce Steps to reproduce the behavior: