this restriction only limits the mapstore interface. If a ROLE_B user decide to edit the layer with another tool (e.g Qgis), he will be able to edit the layer according to GeoServer rules
GeoServer side and mapstore context configuration needs to allow edition for ROLE_A and ROLE_B
editingAllowedRolesByAttribute config name can be change according to community feedback
Default mapstore behavior will not be change
What kind of improvement you want to add? (check one with "x", remove the others)
[ ] Minor changes to existing features
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
This enhancement is suggested by Geo2France (@vfabry @Doctor-Who)
Targeted version
>= release https://github.com/georchestra/mapstore2-georchestra/releases/tag/2023.02.00-RC4-geOrchestra
Linked issue
Description
Currently, FeatureEditor plugin allow to restrict modifications to some roles via editionAllowedRoles config.
Here an example from current behavior where ROLE_A and ADMIN can fullly edit geometry and every attributes :
But in some cases, It may be useful for a list of roles to restrict input by attribute.
So, we propose to insert a new config to allow one (or many) ROLES to edit a specific attribute in MapStore (not all the layer).
Here, an example where :
ADMIN
andROLE_A
can edit every attributes / geomROLE_B
can only edit aCOMMENTS
attributeFor this enhancement, please note that :
allow
edition for ROLE_A and ROLE_BWhat kind of improvement you want to add? (check one with "x", remove the others)
Other useful information
https://github.com/geosolutions-it/MapStore2/blob/fe79d86b843f7fc8619bf01aa7d129df7ee755ac/web/client/components/data/featuregrid/enhancers/editor.js#L86
https://mapstore.geosolutionsgroup.com/mapstore/docs/api/framework#components.data.featuregrid.editors.customEditors