From 7a8586e90608d7448afa6b51f3ad10fe37703a57 Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Mon, 17 Oct 2016 10:53:07 -0400 Subject: [PATCH] checkwhethertosave was no longer correct --- frontend/src/Metamaps/JIT.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/frontend/src/Metamaps/JIT.js b/frontend/src/Metamaps/JIT.js index 6c272a50..b037224f 100644 --- a/frontend/src/Metamaps/JIT.js +++ b/frontend/src/Metamaps/JIT.js @@ -938,20 +938,8 @@ const JIT = { // check whether to save mappings const checkWhetherToSave = function () { const map = Active.Map - if (!map) return false - - const mapper = Active.Mapper - // this case - // covers when it is a public map owned by you - // and also when it's a private map - const activeMappersMap = map.authorizePermissionChange(mapper) - const commonsMap = map.get('permission') === 'commons' - const realtimeOn = Realtime.status - - // don't save if commons map, and you have realtime off, - // even if you're map creator - return map && mapper && ((commonsMap && realtimeOn) || (activeMappersMap && !commonsMap)) + return map.authorizeToEdit(Active.Mapper) } if (checkWhetherToSave()) {