From 3a30efffe328ad4aca11834008bdcf7b486e2e10 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Sun, 14 Aug 2011 10:38:55 +0200 Subject: [PATCH] exernal editor: ignore versioning requests (saveasnewversion) --- CHANGES.txt | 3 ++- browser/configure.zcml | 11 +++++++++-- browser/node.py | 4 ++++ browser/resource.py | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5795ac9..ea091e2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,7 +9,8 @@ $Id$ - media assets: allow for access restriction for viewing larger than a given maximum size (via option ``media.unauthorized_max_size``) - external editor functionality: include title field in data in order to - make it work correctly with the current version of the client module + make it work correctly with the current version of the client module; + ignore versioning requests (saveasnewversion) - suppress node view reload when node has been modified in management interface - overwrite also basic attributes via addObject(), e.g. when importing loops data - allow editing/creation of work items by others (creator, admin), diff --git a/browser/configure.zcml b/browser/configure.zcml index f804955..92746a0 100644 --- a/browser/configure.zcml +++ b/browser/configure.zcml @@ -502,16 +502,23 @@ permission="zope.ManageContent"> + + + + - - diff --git a/browser/node.py b/browser/node.py index 731910f..5b295fd 100644 --- a/browser/node.py +++ b/browser/node.py @@ -563,6 +563,10 @@ class NodeView(BaseView): self.recordAccess('external_edit') return ExternalEditorView(target, self.request).load(url=url) + def externalEditorSaveAsNewVersion(self): + # ignore versioning requests issued by external editor client + pass + # work items @Lazy diff --git a/browser/resource.py b/browser/resource.py index 08e3dda..f468ac5 100644 --- a/browser/resource.py +++ b/browser/resource.py @@ -370,6 +370,7 @@ class DocumentView(ResourceView): class ExternalEditorView(ExternalEditorView, BaseView): + # obsolete, base class is used immediately def load(self, url=None): #context = removeSecurityProxy(self.context)