From 0292be054e5e79c0815f778fb96bdd08675f5b8e Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Thu, 8 May 2014 14:56:02 -0700 Subject: [PATCH] I think this fixes #976. I believe the client was attempting to save components and systems it didn't have write access to, and that was gumming up the works. Not 100% sure though; reopen if it rears its ugly head once more. --- app/views/editor/level/save_view.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/editor/level/save_view.coffee b/app/views/editor/level/save_view.coffee index 86ba7e96b..75226dd54 100644 --- a/app/views/editor/level/save_view.coffee +++ b/app/views/editor/level/save_view.coffee @@ -35,6 +35,7 @@ module.exports = class LevelSaveView extends SaveVersionModal models = if @lastContext.levelNeedsSave then [@level] else [] models = models.concat @lastContext.modifiedComponents models = models.concat @lastContext.modifiedSystems + models = (m for m in models when m.hasWriteAccess()) for changeEl, i in changeEls model = models[i] try @@ -44,6 +45,7 @@ module.exports = class LevelSaveView extends SaveVersionModal console.error "Couldn't create delta view:", e shouldSaveEntity: (m) -> + return false unless m.hasWriteAccess() return true if m.hasLocalChanges() return true if (m.get('version').major is 0 and m.get('version').minor is 0) or not m.isPublished() and not m.collection # Sometimes we have two versions: one in a search collection and one with a URL. We only save changes to the latter.