Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display document byline viewlet only to anonymous users #90

Merged
merged 2 commits into from
Jun 2, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Changelog

Incompatibilities:

- Deprecated ``plone.app.layout.globals.pattern_settings``.
- Deprecated ``plone.app.layout.globals.pattern_settings``.
Moved view to ``Products.CMFPlone.patterns.view``.
Deprecated also pointless interface for this view.
Addresses https://github.com/plone/Products.CMFPlone/issues/1513 and goes together with https://github.com/plone/Products.CMFPlone/issues/1514.
Expand All @@ -18,6 +18,9 @@ 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`_).
[hvelarde]

- Fix body class ``pat-markspeciallinks`` not set.
Fixes #84.
[thet]
Expand Down Expand Up @@ -1708,3 +1711,4 @@ Fixes:
.. _`CMFPlone#1037`: https://github.com/plone/Products.CMFPlone/issues/1037
.. _`CMFPlone#1151`: https://github.com/plone/Products.CMFPlone/issues/1151
.. _`CMFPlone#1178`: https://github.com/plone/Products.CMFPlone/issues/1178
.. _`CMFPlone#1556`: https://github.com/plone/Products.CMFPlone/issues/1556
2 changes: 1 addition & 1 deletion plone/app/layout/viewlets/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def show(self):
ISecuritySchema,
prefix='plone',
)
return not self.anonymous or settings.allow_anon_views_about
return self.anonymous and settings.allow_anon_views_about
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to add a test so we don't get a regression in this important line again. Where do you think it would be the best place?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not showing for non-anonymous too?
Only reason I can think of is, that the some of the information is available in the toolbar too. But is the toolbar also visible for simple members without editing rights? Then we need this viewlet also for them.

Copy link
Member

@davilima6 davilima6 May 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the clock icon is available to Members.

Copy link
Member Author

@hvelarde hvelarde May 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thet well, another proof that the toolbar design was half baked and the removal of the viewlet was a bad idea in the first place; I would prefer to leave the document byline visible for all, but in the past we had some heated discussions as some people simply wanted to get rid of it without thinking on all the unintended consequences. I was trying to move on but, yes, you are right.

IMO the document byline helps to remove the cluttering of the toolbar and there are many regressions caused by its removal.

@davilima6 the clock icon is not solving all cases; see plone/Products.CMFPlone#1575


def show_history(self):
has_access_preview_versions_permission = _checkPermission(
Expand Down