Control access on future content

前端 未结 2 2017
难免孤独
难免孤独 2021-01-21 17:00

this is mostly about public content timed on the future, but not only.

In a standard Plone site if you create a top-level content is not shown on the navigation (is stil

相关标签:
2条回答
  • 2021-01-21 17:50

    there is an addon product that does exactly what you need:

    collective.wfeffectiverange

    it works by adding a cron job that looks for not yet published (effective date in the future) or expired (expiration date reached) content and apply a workflow transition in this case.

    see https://pypi.python.org/pypi/collective.wfeffectiverange for more information

    0 讨论(0)
  • 2021-01-21 17:53

    1.) Create a contenttype per privilege-level you want to have ('premium', 'paid subscriber') and assign a dedicated workflow to each, holding at least the states 'editors-review' and 'premium-published', respectively 'editors-review' and 'paidsub-published', and wire the states to equivalent roles ('editors', premiumusers', 'paidsubscribers'), to grant the View-permissions, as intended. Additionally it is recommandable to create a group for each role, wire them together, and assign the users to the groups, instead to roles.

    2.) Use collective.contentrules.comingsoon to apply a contentrule which sets the state from 'editors-review' to 'premium-published', respectively 'editors-review', when the publishing-date is met (executed via a browserview, triggered of a cron).

    3.) To overcome Plone's default setting, that items with a publish-date set in the future won't appear in navi-elements, you need to customize/override the refering templates. That'll include globalnav, navportlet, sitemap, folder_listing, etc.

    0 讨论(0)
提交回复
热议问题