Fix permissions policies and tests (fixes #303) #336
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@oliverroick and @wonderchook Could you review the permissions policies (in
cadasta/config/permissions
) to check that they tally with what you think different classes of user should be able to do? I had to update a number of things, and I think it's now consistent and sensible, but it would be good for someone else to take a look.By the way, you can get a full list of all the actions that are registered with tutelary by doing the following in the VM:
I've also had to comment out one method in the party relationships stuff to get the test coverage to 100%, just because there's no UI to test that stuff against yet, so there's no way to exercise that code path. (It was previously being incorrectly exercised because of Cadasta/django-tutelary#28 -- that's now fixed, and this PR also updates the tutelary version to get the new behaviour for 404 exceptions and removes some redundant code that was only being called because 404 exceptions were being swallowed by tutelary.)