Please track under the clockify project [LX Collab Mapping]
Description
Following on from #304
Currently when a map is shared with another LX user the additional user has permission to View the map in read only mode. Lots of users want to be able to share a map and have the map be editable. As part of the Oxon work on Collab Mapping I want to enable a shared map to edited by the person with whom it is shared. Currently the user just had read-only permission.
Once two users can edit a map at once we have additional complication. Can they edit the map at the same time? Much of the edit functionality currently implemented in LX rewrites the entire map to save an update. This means that if two users are editing the map at the same time they will overwrite each others changes. The full solution for collaborative mapping with be to create API endpoints for processing each update independently. But that is out of scope here.
The scope of this piece is to create a mechanism to lock a map when it is being used by another user.
When the user hasn't updated the map for 5 minutes the map is unlocked.
If another user tried to access the locked map they see an error message 'This map is currently being edited by another person. Please try again later. If you continue to see this message please contact us.' Contact us is a mailto link to 'landexplorer@digitalcommons.coop'
I know @rogup has good ideas of how this should be implemented. The plan is for @ms0ur1s and @rogup to discuss as and when :)
Acceptance Criteria
When a user is editing a map the map is 'locked' to edits by another user.
When a user has not edited the map for 5 mins the map is 'unlocked'
The above error message is displayed to the user if they try to edit a map that is locked. In this case the map opens in read-only mode.
If a user is editing a map and is idle for 5mins+ and the map edit lock is then taken by another user, the first user should see the error message when the next auto-save happens.
Please track under the clockify project [LX Collab Mapping]
Description
Following on from #304 Currently when a map is shared with another LX user the additional user has permission to View the map in read only mode. Lots of users want to be able to share a map and have the map be editable. As part of the Oxon work on Collab Mapping I want to enable a shared map to edited by the person with whom it is shared. Currently the user just had read-only permission.
Once two users can edit a map at once we have additional complication. Can they edit the map at the same time? Much of the edit functionality currently implemented in LX rewrites the entire map to save an update. This means that if two users are editing the map at the same time they will overwrite each others changes. The full solution for collaborative mapping with be to create API endpoints for processing each update independently. But that is out of scope here.
The scope of this piece is to create a mechanism to lock a map when it is being used by another user. When the user hasn't updated the map for 5 minutes the map is unlocked. If another user tried to access the locked map they see an error message 'This map is currently being edited by another person. Please try again later. If you continue to see this message please contact us.' Contact us is a mailto link to 'landexplorer@digitalcommons.coop'
I know @rogup has good ideas of how this should be implemented. The plan is for @ms0ur1s and @rogup to discuss as and when :)
Acceptance Criteria