Show protected nodes to all authenticated users

Frank Steiner - January 21, 2009 - 10:30
Project:Protected node
Version:6.x-1.4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,
we have a setting (a chair of a university) where we need protected nodes only to provide some materials to some specific groups of students. So every group gets an password and then they can download their stuff.
All those students don't have a login. On the other hand, everyone who has a login is allowed to see all those protected nodes.

I can hack this for our site quickly. But if you think that this could be a interesting feature for protected node in general, I can make it a clean patch. The patch would add a checkbox "Bypass protection for authenticated users" in the settings, and if it was checked, any authenticated user could access any protected node without entering the password.

I could imagine someone else might want to use this, because there are lot of modules allowing role-based access restrictions. So, usually you wouldn't need protected node to hide content from users which have a login at your site, but mainly to allow access to people, who don't have one.

Let me know what you think!

#1

tolmi - January 21, 2009 - 11:08

It is more reasonable to add a permission to bypass protection. It is a standardised way of dealing with such issues I think. If you're willing to create a simple patch (please do not send a monster patch as the first patch you created gave me massive work and still not completely sure how it will affect my plans with the module) which adds new permissions dealing with permission bypass then I will incorporate it. (But please open a separate issue for it)

Update: I was careless, you did open a new issue for it. Sorry about it.

#2

lennart - January 22, 2009 - 08:52

I would like to see such functionality. Even as user=1 I am now not permitted to see the protected nodes of other users without having to get every single password.

#3

Frank Steiner - January 22, 2009 - 09:09
Status:active» needs review

Ok, here's a try with the permission system.

AttachmentSize
protected_node_bypass.patch 1.24 KB

#4

tolmi - February 13, 2009 - 08:27

It seems okay to me, can anybody else test this patch then I can commit it. It does not seem to affect the bugfixes so far.

#5

tolmi - February 28, 2009 - 09:18
Status:needs review» fixed

Ok, I commited you patch. Thank you.

#6

System Message - March 14, 2009 - 09:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.