Add geometry to admin groups #56
Open
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.
Description of Change
Added in the changes from the eamena_v3 PR
Issues Solved
eamena_v3 61
eamena_v3 62
eamena_v3 63
eamena_v3 65
eamena_v3 66
Types of changes
Checklist
Further comments
To get this working you first need to install olwidget:
The accompanying js, css and template files have already been added to the branch.
You'll also need to add the new column to the PostgreSQL table:
Finally, the changes in the arches_overrides files need to be installed so when inside the virtual environment run
python setup.py installin the eamena_dev directory.Each group should now contain a widget to set the geometry. The three basic groups 'read', 'edit' and 'editplus' should be edited so that the geom contains all of the EAMENA data. Any new group that starts with 'edit' (e.g. edit_syria) will give the user permission to edit and create resources within that geometry. Any groups starting with 'editplus' will give the user delete permission within that geom. Groups that start with 'restrict' will remove all permissions, including view, for that area. Thus users can be part of multiple 'read_', 'edit_', 'editplus_' and 'restrict_' groups to define which resources they can access based on their location. Mulitple KML files can be drag and dropped onto the map area on the admin page to define the geometries.
FYI, some fairly basic things have been changed, for example the middleware that creates the user.user_groups list now creates a string. This means that any group which contains the substring 'edit' will be recognised without the user having to be part of the explicit 'edit' group. This shouldn't cause any problems within this PR, but is worth noting for future development.