diff --git a/CHANGES.rst b/CHANGES.rst index 9efcc5b0..3245ad82 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -19,6 +19,7 @@ New: Fixes: - Document byline viewlet is now displayed only to anonymous users if permited by the `Allow anyone to view 'about' information` option in the `Security Settings` of `Site Setup` (closes `CMFPlone#1556`_). + Code used to show the lock status, expired condition and history view was removed from the document byline as this information was not available to anonymous users anyway. [hvelarde] - Fix body class ``pat-markspeciallinks`` not set. diff --git a/plone/app/layout/viewlets/content.py b/plone/app/layout/viewlets/content.py index c4aebbeb..9ce1fee6 100644 --- a/plone/app/layout/viewlets/content.py +++ b/plone/app/layout/viewlets/content.py @@ -73,42 +73,6 @@ def show(self): ) return self.anonymous and settings.allow_anon_views_about - def show_history(self): - has_access_preview_versions_permission = _checkPermission( - 'CMFEditions: Access previous versions', - self.context - ) - if not has_access_preview_versions_permission: - return False - if IViewView.providedBy(self.__parent__): - return True - if IFolderContentsView.providedBy(self.__parent__): - return True - return False - - def locked_icon(self): - if not getSecurityManager().checkPermission('Modify portal content', - self.context): - return "" - - locked = False - lock_info = queryMultiAdapter((self.context, self.request), - name='plone_lock_info') - if lock_info is not None: - locked = lock_info.is_locked() - else: - context = aq_inner(self.context) - lockable = getattr( - context.aq_explicit, 'wl_isLocked', None) is not None - locked = lockable and context.wl_isLocked() - - if not locked: - return "" - - portal = self.portal_state.portal() - icon = portal.restrictedTraverse('lock_icon.png') - return icon.tag(title='Locked') - def creator(self): return self.context.Creator() diff --git a/plone/app/layout/viewlets/document_byline.pt b/plone/app/layout/viewlets/document_byline.pt index c98e5e3a..24b9e32a 100644 --- a/plone/app/layout/viewlets/document_byline.pt +++ b/plone/app/layout/viewlets/document_byline.pt @@ -2,12 +2,6 @@ id="plone-document-byline" i18n:domain="plone" tal:condition="view/show"> - - - - expired - - — - History - -
' - ) - self.assertEqual(viewlet.locked_icon(), lockIconUrl) - def test_pub_date(self): # configure our portal to enable publication date on pages globally on # the site