MerginMaps/mobile

Filtering visibility with rule-based rendering by username makes features un-editable

Opened this issue · 0 comments

When using rule-based rendering to only allow a user to see features they've created, a feature becomes un-editable once it has been created, even when being edited by the user who created it.

Example

I have created an example project support/rules-based-rendering where there is a field called UserName which is set to default value @mergin_username . Rendering for the layer is rule based and there is a filter on all points so only the user who created the point and a designated admin user - in this case support can view the points. The expression for the filter is:

 "UserName" = @mergin_username OR @mergin_username = 'support'

Prior to the update to mobile version 2024.1.0, this worked as expected. A user could only see features that they created or had the UserName field set to their username and they could also edit those features in the app. However, since updating to the latest version of the app, features are no longer editable after they have been saved. A user can create new features and see features with their username, but they cannot edit them. See the video below for an example:

rules-render.mp4