it would be neat to be able to provide a link that unlocked a specific node just by following the link. this would remove the hassle of having to remember the password and having to type it out to gain access to the node. This would also enable the publisher of the node to provide a much easier way for the indented audience to gain access.

Comments

beginner’s picture

@tolmi , what do you think about this feature?

If you think it would be a good addition to your module, I will roll a patch for it within a week or two (I must upgrade the site to D5 first).

Do you have any pointer or design advice for me, that could help me getting up to speed with the internals of the module?

thanks.

mtolmacs’s picture

@beginner, what you intend to accomplish with this feature does not fit very well to my original concept of protected_node.

But I think this feature could come in handy for some people and from the users perspective it does mean some kind of protections of various node types. So do it.

My advice is that you should try to implement this functionality as separately from the password protection code as possible in order to let the code be maintainable. I know it seems wasting resources making an another round of switch($op) in hook_nodeapi, but I hope this will bring clean separation of functional aspects.

Thank you for your volunteer and - again - sorry for answering sooo late. I try to be more responsive (though you can always nudge me through personal contact form ;) )

rgme’s picture

So, I know this issue is ancient, but I figure it's worth a try to vote for this feature. At the risk of exposing my Drupal naivete...would tokens be of use in extracting a password from the url?

My uses for the module mirror jesusjim's above...a convenient method for anonymous, informed (i.e., received a link) people to quickly gain access to a single node.

AlexisWilke’s picture

This is exactly what I'd need! 8-)

So if someone comes to a protected node and knows the password, they can see the node. Otherwise, I can have an auto-generated URL that gives someone a one time view of the node. Once the cookie goes bye bye, they lose the view privilege (I guess that link could be permanently working too...)

That would be easy to implement with an additional session like table. Something like /protected_node/sessid and when you go there, you are redirected to the unlocked node as long as the session did not yet expire.

Cool.

Although I'd do that for 6.x, not 5.x!

Thank you.
Alexis

mtolmacs’s picture

No new features go into 5.x branch and it will be removed from active branches once D7 comes out. Secfixes of course will be backported until D7.

AlexisWilke’s picture

Version: 5.x-1.0 » 6.x-1.5

Oh I know. I did not change the version, but you only have 51 users of version 5.x anyway. So not worth the trouble at all.

I was kind of like thinking out loud. I like the idea to have such a feature in D6. Since you're saying that new features will not make it in D5, I'm changing the version now. 8-) We'll see if I find the time to do this one.

Thank you.
Alexis

mtolmacs’s picture

Alexis,

My policy for this module et all is not to extend it with features except when the feature strongly connects to the core idea of the module. Views is a nice example on how to bloat a module to incomprehensible sizes. I'm not going to start that.

This is why an API was introduced. If you're thinking of a loosely coupled feature (in terms of core idea), then send patches which extend the capabilities of the API for other modules to do your feature and not forcing your one true feature on every user of this module.

AlexisWilke’s picture

I started to work on this one. I don't yet have a one time "HTML" link (URL). But there is a way to email people the password and link to the node.

That URL requires a session like number that is valid only for a small period of time and gets cleared when used (or can only get used X number of times...) so that's not done yet. But that's still a very good idea.

Thank you.
Alexis Wilke

Grimreaper’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Hello,

I close this issue because Drupal 6 is no more supported. https://www.drupal.org/drupal-6-eol

If this issue is present in Drupal 7, feel free to re-open it.