[Testbot] Plone 4.3 - Python 2.7 - Build # 2050 - Still failing! - 7 failure(s)

jenkins at plone.org jenkins at plone.org
Sun Mar 16 03:27:17 UTC 2014


-------------------------------------------------------------------------------
Plone 4.3 - Python 2.7 - Build # 2050 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-4.3-python-2.7/2050/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.schemaeditor
Branch: refs/heads/master
Date: 2014-03-15T19:32:15-07:00
Author: Luke Brannon (lukebrannon) <luke.brannon at gmail.com>
Commit: https://github.com/plone/plone.schemaeditor/commit/beaf5b3eb7953e08fe630dd7a76328383abcce69

integrated addTokenToUrl from plone.protect.utils on generated delete url

Files changed:
M plone/schemaeditor/browser/schema/listing.py

diff --git a/plone/schemaeditor/browser/schema/listing.py b/plone/schemaeditor/browser/schema/listing.py
index 860ebab..a36b3bd 100644
--- a/plone/schemaeditor/browser/schema/listing.py
+++ b/plone/schemaeditor/browser/schema/listing.py
@@ -7,6 +7,7 @@
 from plone.z3cform.layout import FormWrapper
 from plone.memoize.instance import memoize
 from plone.autoform.form import AutoExtensibleForm
+from plone.protect.utils import addTokenToUrl
 from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
 
 from plone.schemaeditor import SchemaEditorMessageFactory as _
@@ -72,7 +73,10 @@ def edit_url(self, field):
             return '%s/%s' % (self.context.absolute_url(), field.__name__)
 
     def delete_url(self, field):
-        return '%s/%s/@@delete' % (self.context.absolute_url(), field.__name__)
+        url = '%s/%s/@@delete' % (self.context.absolute_url(), field.__name__)
+        url = addTokenToUrl(url, self.request)
+        return url
+
 
     @button.buttonAndHandler(_(u'Save Defaults'))
     def handleSaveDefaults(self, action):


Repository: plone.schemaeditor
Branch: refs/heads/master
Date: 2014-03-15T19:37:45-07:00
Author: Luke Brannon (lukebrannon) <luke.brannon at gmail.com>
Commit: https://github.com/plone/plone.schemaeditor/commit/a163d21dbf442c135a90c46b1de3a6148b413aff

merge conflicting listing.py

Files changed:
M CHANGES.rst
M plone/schemaeditor/browser/schema/listing.py
M plone/schemaeditor/browser/schema/traversal.py
M plone/schemaeditor/configure.zcml
M plone/schemaeditor/interfaces.py
M plone/schemaeditor/tests/robot/test_fields.robot
M setup.py

diff --git a/CHANGES.rst b/CHANGES.rst
index 2c67139..c129243 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,8 +1,12 @@
 Changelog
 =========
 
-1.3.8 (unreleased)
-------------------
+2.0 (unreleased)
+----------------
+
+- Add fieldsWhichCannotBeDeleted attribute to SchemaContext, which can be
+  used to disallow removal of certain fields.
+  [davisagli]
 
 - Fix removeField for EditableSchema to allow for the case where there
   is no fieldset on the schema
diff --git a/plone/schemaeditor/browser/schema/listing.py b/plone/schemaeditor/browser/schema/listing.py
index a36b3bd..37b7d00 100644
--- a/plone/schemaeditor/browser/schema/listing.py
+++ b/plone/schemaeditor/browser/schema/listing.py
@@ -73,11 +73,13 @@ def edit_url(self, field):
             return '%s/%s' % (self.context.absolute_url(), field.__name__)
 
     def delete_url(self, field):
+
+        if field.__name__ in self.context.fieldsWhichCannotBeDeleted:
+            return
         url = '%s/%s/@@delete' % (self.context.absolute_url(), field.__name__)
         url = addTokenToUrl(url, self.request)
         return url
 
-
     @button.buttonAndHandler(_(u'Save Defaults'))
     def handleSaveDefaults(self, action):
         # ignore fields from behaviors by setting their widgets' modes
diff --git a/plone/schemaeditor/browser/schema/traversal.py b/plone/schemaeditor/browser/schema/traversal.py
index 77956ca..715e9c3 100644
--- a/plone/schemaeditor/browser/schema/traversal.py
+++ b/plone/schemaeditor/browser/schema/traversal.py
@@ -19,6 +19,7 @@ class SchemaContext(SimpleItem):
     schemaEditorView = None
     additionalSchemata = ()
     allowedFields = None  # all fields
+    fieldsWhichCannotBeDeleted = ()
 
     def __init__(self, context, request, name=u'schema', title=None):
         super(SchemaContext, self).__init__(context, request)
diff --git a/plone/schemaeditor/configure.zcml b/plone/schemaeditor/configure.zcml
index 34bb330..620d685 100644
--- a/plone/schemaeditor/configure.zcml
+++ b/plone/schemaeditor/configure.zcml
@@ -4,6 +4,7 @@
     xmlns:i18n="http://namespaces.zope.org/i18n"
     i18n_domain="plone.schemaeditor">
 
+    <include package="plone.protect"/>
     <include package="plone.z3cform"/>
 
     <i18n:registerTranslations directory="locales"/>
diff --git a/plone/schemaeditor/interfaces.py b/plone/schemaeditor/interfaces.py
index 66fa2f6..6fb19f0 100644
--- a/plone/schemaeditor/interfaces.py
+++ b/plone/schemaeditor/interfaces.py
@@ -36,6 +36,10 @@ class ISchemaContext(IItem):
         Or None to allow all fields.
         """)
 
+    fieldsWhichCannotBeDeleted = Attribute(
+        """List of field names that may not be deleted from this schema."""
+        )
+
 
 class ISchemaModifiedEvent(IObjectEvent):
 
diff --git a/plone/schemaeditor/tests/robot/test_fields.robot b/plone/schemaeditor/tests/robot/test_fields.robot
index aea70b0..853e2bc 100644
--- a/plone/schemaeditor/tests/robot/test_fields.robot
+++ b/plone/schemaeditor/tests/robot/test_fields.robot
@@ -105,6 +105,9 @@ Delete field
     Click link  css=div.fieldControls .schemaeditor-delete-field
     Confirm Action
     Page Should Not Contain Element  css=#formfield-form-widgets-phone
+    # Make sure it actually got deleted
+    Go to  ${PLONE_URL}/@@dexterity-types/somebody/@@fields
+    Page Should Not Contain Element  css=#formfield-form-widgets-phone
 
 
 #~ Reorder field
diff --git a/setup.py b/setup.py
index 2e64277..c59c119 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = '1.3.8.dev0'
+version = '2.0.dev0'
 
 setup(name='plone.schemaeditor',
       version=version,


Repository: plone.schemaeditor
Branch: refs/heads/master
Date: 2014-03-15T19:38:43-07:00
Author: Luke Brannon (lukebrannon) <luke.brannon at gmail.com>
Commit: https://github.com/plone/plone.schemaeditor/commit/313ddbb160eb44dbda82b4fb17131ab97c1a2830

Merge branch 'master' of git://github.com/plone/plone.schemaeditor

Files changed:
M plone/schemaeditor/configure.zcml

diff --git a/plone/schemaeditor/configure.zcml b/plone/schemaeditor/configure.zcml
index 620d685..34bb330 100644
--- a/plone/schemaeditor/configure.zcml
+++ b/plone/schemaeditor/configure.zcml
@@ -4,7 +4,6 @@
     xmlns:i18n="http://namespaces.zope.org/i18n"
     i18n_domain="plone.schemaeditor">
 
-    <include package="plone.protect"/>
     <include package="plone.z3cform"/>
 
     <i18n:registerTranslations directory="locales"/>




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 6457 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140316/9d0c9aee/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 88493 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140316/9d0c9aee/attachment-0003.obj>


More information about the Testbot mailing list