[Testbot] Plone 5.0 - Python 2.7 - Build # 3046 - Fixed! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Sun Aug 17 04:40:51 UTC 2014


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 3046 - Fixed!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/3046/


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

Repository: Products.LinguaPlone
Branch: refs/heads/master
Date: 2013-04-19T11:05:36+02:00
Author: Christian Prosperini () <christian at eeapc0078.(none)>
Commit: https://github.com/plone/Products.LinguaPlone/commit/bcd856f923f6c851c042d83ad403503f2072185d

Added .metadata file for manage_translations_form, anonymous can't access the page anymore..

Files changed:
A Products/LinguaPlone/skins/LinguaPlone/manage_translations_form.pt.metadata

diff --git a/Products/LinguaPlone/skins/LinguaPlone/manage_translations_form.pt.metadata b/Products/LinguaPlone/skins/LinguaPlone/manage_translations_form.pt.metadata
new file mode 100644
index 0000000..2311d60
--- /dev/null
+++ b/Products/LinguaPlone/skins/LinguaPlone/manage_translations_form.pt.metadata
@@ -0,0 +1,6 @@
+[default]
+title=Manage translations
+
+[security]
+View=0:Authenticated
+


Repository: Products.LinguaPlone
Branch: refs/heads/master
Date: 2013-04-19T11:34:26+02:00
Author: Christian Prosperini (prospchr) <cx.prosperini at gmail.com>
Commit: https://github.com/plone/Products.LinguaPlone/commit/bafd05a1400940995189d4220c729e73f9a24306

Fixed permission for manage_translations_form, anonymous can't access the page anymore.[prospchr]

Files changed:
M CHANGES.txt

diff --git a/CHANGES.txt b/CHANGES.txt
index ee491a5..cf879af 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,10 @@ Changelog
 4.1.4 (unreleased)
 ------------------
 
+- Fixed permission for manage_translations_form, anonymous can't access the page 
+  anymore.
+  [prospchr]
+
 - getTypeInfo : defer computation of isCanonical
   [gotcha]
 


Repository: Products.LinguaPlone
Branch: refs/heads/master
Date: 2014-08-17T05:17:25+02:00
Author: Jens W. Klein (jensens) <jk at kleinundpartner.at>
Commit: https://github.com/plone/Products.LinguaPlone/commit/82340d7fad071350522bca5ed8db8fab4e4ad755

merged pros/master into plone/master

Files changed:
A Products/LinguaPlone/skins/LinguaPlone/manage_translations_form.pt.metadata
M CHANGES.txt

diff --git a/CHANGES.txt b/CHANGES.txt
index aecec73..f4f55fe 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,10 @@ Changelog
 - Add uninstall profile.
   [thet]
 
+- Fixed permission for manage_translations_form, anonymous can't access the page 
+  anymore.
+  [prospchr]
+
 - getTypeInfo : defer computation of isCanonical
   [gotcha]
 
diff --git a/Products/LinguaPlone/skins/LinguaPlone/manage_translations_form.pt.metadata b/Products/LinguaPlone/skins/LinguaPlone/manage_translations_form.pt.metadata
new file mode 100644
index 0000000..2311d60
--- /dev/null
+++ b/Products/LinguaPlone/skins/LinguaPlone/manage_translations_form.pt.metadata
@@ -0,0 +1,6 @@
+[default]
+title=Manage translations
+
+[security]
+View=0:Authenticated
+


Repository: Products.LinguaPlone
Branch: refs/heads/master
Date: 2014-08-17T05:18:24+02:00
Author: Jens W. Klein (jensens) <jk at kleinundpartner.at>
Commit: https://github.com/plone/Products.LinguaPlone/commit/aa29b746810fbb2af7e2c356aff4dd483da31982

Merge branch 'master' of github.com:plone/Products.LinguaPlone

Files changed:
M CHANGES.txt
M Products/LinguaPlone/browser/defaultpage.py
M Products/LinguaPlone/tests/test_defaultpage.py

diff --git a/CHANGES.txt b/CHANGES.txt
index f4f55fe..e20ecf7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,9 @@ Changelog
 4.1.4 (unreleased)
 ------------------
 
+- Fix handling of deleted or renamed "default page" items.
+  [witsch]
+
 - Add uninstall profile.
   [thet]
 
diff --git a/Products/LinguaPlone/browser/defaultpage.py b/Products/LinguaPlone/browser/defaultpage.py
index 613ea9f..59462d5 100644
--- a/Products/LinguaPlone/browser/defaultpage.py
+++ b/Products/LinguaPlone/browser/defaultpage.py
@@ -14,7 +14,7 @@ def getDefaultPage(self):
         if not default_page:
             return default_page
 
-        page = self.context[default_page]
+        page = self.context.restrictedTraverse([default_page])
         languageTool = getToolByName(self.context, 'portal_languages')
         current = languageTool.getPreferredLanguage()
         if page.hasTranslation(current):
diff --git a/Products/LinguaPlone/tests/test_defaultpage.py b/Products/LinguaPlone/tests/test_defaultpage.py
index bf8f0f5..83f6baa 100644
--- a/Products/LinguaPlone/tests/test_defaultpage.py
+++ b/Products/LinguaPlone/tests/test_defaultpage.py
@@ -195,3 +195,22 @@ def testTranslatingDefaultPageInNeutralFolderDoesntCreateFolder(self):
         self.assertTrue(german_doc.getId() in neutral_folder)
         self.assertTrue(isDefaultPage(neutral_folder, english_doc))
         self.assertFalse(isDefaultPage(neutral_folder, german_doc))
+
+
+class TestAcquiredDefaultPage(LinguaPloneTestCase):
+
+    def afterSetUp(self):
+        directlyProvides(self.portal.REQUEST, ILinguaPloneProductLayer)
+        self.addLanguage('de')
+        self.setLanguage('en')
+        self.english = makeContent(self.folder, 'SimpleType', 'news')
+        self.english.setLanguage('en')
+        self.german = makeTranslation(self.english, 'de')
+
+    def testDeletedDefaultPage(self):
+        # after deleting a default page with a name that can be acquired
+        # (e.g. `news` or `index_html`) that page should be returned...
+        self.folder.setDefaultPage(self.english.getId())
+        del self.folder[self.english.getId()]
+        result = self.folder.getDefaultPage()
+        self.failUnlessEqual(result, self.english.getId())




-------------------------------------------------------------------------------


More information about the Testbot mailing list