I have setup several subscription based sites using Drupal. Normally, the client wants the user's to have access to all previous content upon subscribing. For this new client, that is not the case. They would like to be able to restrict access to specific content based on the date the node was posted and the date the user was created.

They would like to allow users to only view future created content and not have access to content that was previously posted. They are going to offer those previously posted articles as individual products for sale.

If anyone has any pointers for this, I'd really appreciate it. Thanks!

Comments

jaypan’s picture

You can use hook_node_access_records() and hook_node_grants() to set up a grants system. In hook_node_grants(), you can check the user's creation date, and give permission accordingly.

Kind of tricky though if you haven't done any module development before, particularly if you haven't worked with those hooks.

Contact me to contract me for D7 -> D10/11 migrations.

interestingaftermath’s picture

Is this something you'd be comfortable setting up? I'd be happy to talk about a proposal.

jaypan’s picture

Yes definitely (I've actually gotten a fair bit of work that way in the past!). Feel free to send me a mail through my user page, and I'll get back to you.

Contact me to contract me for D7 -> D10/11 migrations.

gvincke’s picture

Hi,

I'm building a site for an association using Drupal 6.
I'm trying to set-up a system allowing members to have access to some contents older than their account date creation.

Can you explain me how you setted up your's ?

Thanks,

Grégoire